Exemplo n.º 1
0
        protected void btnLastStep_Click(object sender, EventArgs e)
        {
            if (bsn.ChangeContractStatusToLastStep(Convert.ToInt32(Request.QueryString["hc"].Trim()), Convert.ToInt32(Request.QueryString["uc"].Trim()), _typeOfContract == DTO.contract.HeadOfDepartment ? ucContract_HeadOfDepartment.year : ucContract.term))
            {
                string description = "  بازگشت به کارتابل قبل";
                switch (_typeOfContract)
                {
                case DTO.contract.educationContract:
                    DataTable dt = bsn.getTerm_Contract();
                    if (dt.Rows.Count > 0)
                    {
                        description += string.Format("نیم سال {0} سال تحصیلی {1}", dt.Rows[0]["nimsal"].ToString(), dt.Rows[0]["sal"].ToString());
                    }
                    break;

                case DTO.contract.HeadOfDepartment:
                    description += string.Format(" سال {0} ", ucContract_HeadOfDepartment.year);
                    break;
                }
                setLog(Convert.ToInt32(Request.QueryString["hc"].Trim()), description, false);
                ScriptManager.RegisterStartupScript(uplConfirm, uplConfirm.GetType(), "CloseAndRebind", "CloseAndRebind(true);", true);
            }
            else
            {
                showMessage("خطایی در بازگشت قرارداد به مرحله قبل به وجود آمده است. لطفا مجددا تلاش فرمایید.", false);
            }
        }