protected void grdContracts_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { int teacherCode = 0; try { teacherCode = Convert.ToInt32(e.CommandArgument.ToString()); } catch { } if (teacherCode < 1) { return; } switch (e.CommandName) { case "ShowContract": string TC = ddlContractType.SelectedItem.Value == "1" ? DTO.contract.educationContract : DTO.contract.HeadOfDepartment; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openWin('sc=" + e.Item.Cells[3].Text + "&hc=" + teacherCode + "&uc=" + ViewState[userType].ToString() + "&vs=" + (ddlContractStatus.SelectedItem.Value.ToString() == "2" ? "s" : "v") + "&TC=" + TC + "');", true); break; case "History": Business.Common.CommonBusiness cmb = new Business.Common.CommonBusiness(); lst_history.DataSource = cmb.getContractHistory(teacherCode); lst_history.DataBind(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true); break; //case "AcceptContract": // Business.university.CooperationRequest.CooperationRequestBusiness bsn = new Business.university.CooperationRequest.CooperationRequestBusiness(); // if (bsn.updateTeacherContractStatus(teacherCode, Convert.ToInt32(ViewState[userType]))) // { // setLog(teacherCode, ""); // } // break; } setGrdDatasource(); grdContracts.DataBind(); }