protected void GVTraderdueReport_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GVTraderdueReport.EditIndex = -1;
GettraderwiseLiftingRecords();
}
protected void GVTraderdueReport_RowEditing(object sender, GridViewEditEventArgs e)
{
GVTraderdueReport.EditIndex = e.NewEditIndex;
GettraderwiseLiftingRecords();
}
protected void GVTraderdueReport_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
TextBox txtrecamount = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[3].Controls[1];
TextBox txtrecdate = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[4].Controls[1];
TextBox txtchknumber = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[5].Controls[1];
TextBox txtremark = (TextBox)GVTraderdueReport.Rows[e.RowIndex].Cells[6].Controls[1];
string tradername = Convert.ToString(GVTraderdueReport.DataKeys[e.RowIndex].Values[0].ToString());
IFormatProvider provider = new System.Globalization.CultureInfo("en-CA", true);
String recdate1 = txtrecdate.Text.Trim().ToString();
DateTime recdate2 = DateTime.Parse(recdate1, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault);
objhatcheryPL.name = tradername;
objhatcheryPL.cashrec = Convert.ToInt32(txtrecamount.Text.ToString());
objhatcheryPL.recdate = recdate2;
objhatcheryPL.chequeno = txtchknumber.Text.ToString();
objhatcheryPL.remark = txtremark.Text.ToString();
objhatcheryPL.username = Session["username"].ToString();
int? chkduetatus;
chkduetatus = objhatcheryBAL.updateChicksalesDueReport(objhatcheryPL);
if (chkduetatus.Equals(1))
{
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "SelectDetails", "alert('Updated Successful');", true);
}
GVTraderdueReport.EditIndex = -1;
GettraderwiseLiftingRecords();
}
protected void GVTraderdueReport_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.ToUpper() == "VIEWHISTORY")
{
GridViewRow row = (GridViewRow)((ImageButton)e.CommandSource).NamingContainer;
int index = row.RowIndex;
string farmername = Convert.ToString(GVTraderdueReport.DataKeys[index].Value);
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Open", "window.open('../Reports/viewHatcherysalesdueentry.aspx?name=" + farmername + "', '_blank', 'dependent,resizable=yes,scrollbars=yes,top=0,height=600');", true);
}
}
它正在互联网上进行探索,但在Google crome中却无法正常工作。我没有得到什么问题。我在母版页中编写了代码。如果我点击编辑按钮,更新和取消按钮正在释放,但当我点击它时,他们没有响应,类似GO按钮。请任何人帮助我。