Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DateTime sd = DateTime.Now;
            DateTime ed;

            try
            {
                if (!Page.IsPostBack)
                {
                    CtlAgreementPercent111.NotDefaultAgree = true;
                    CtlAgreementPercent111.AgreementID     = Convert.ToInt32(Request.QueryString["aid"]);
                    CtlAgreementPercent111.onlyActive      = 0;

                    CtlAgreementPercent111.BindDD();
                    CtlAgreementPercent111.BindGrid();
                    CtlAgreementPercent111.NotDefaultAgree = true;
                }
                CtlAgreementPercent111.Bindtbljarime();
            }
            catch (Exception ex)
            {
                ed = DateTime.Now;
                var     lineNumber = new System.Diagnostics.StackTrace(ex, true).GetFrame(0).GetFileLineNumber();
                clError cl         = new clError();
                cl.ErrorLog = ex.Message.ToString();
                cl.Page     = HttpContext.Current.Request.Url.OriginalString;
                cl.timeLeft = (ed - sd).TotalSeconds.ToString();
                cl.IP       = CSharp.PublicFunction.GetIPAddress();
                ErrorDAL.insert(cl);
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["AgreeID"] == null)
                {
                    Response.Redirect("~/Bazras/AgreePercent.aspx");
                    return;
                }
                CtlAgreementPercent111.NotDefaultAgree = true;
                CtlAgreementPercent111.AgreementID     = Convert.ToInt32(Session["AgreeID"]);
                CtlAgreementPercent111.BindDD();
                CtlAgreementPercent111.BindGrid();
                CtlAgreementPercent111.NotDefaultAgree = true;
                if (Session["semat"].ToString() == "1")
                {
                    CtlAgreementPercent111.Setpeymankar();
                }
                else if (Session["semat"].ToString() == "6" || Session["semat"].ToString() == "4" || Session["semat"].ToString() == "2")
                {
                    CtlAgreementPercent111.SetNazer(Session["UserID"].ToString());
                }


                if (Session["sematID"].ToString() == "2")
                {
                    CtlAgreementPercent111.ISNzareAli = Convert.ToBoolean("True");
                }
                else
                {
                    CtlAgreementPercent111.ISNzareAli = Convert.ToBoolean("False");
                }

                if (Session["sematID"].ToString() == "4")
                {
                    CtlAgreementPercent111.VisibleInsertBtn = false;
                }


                if (Session["sematID"].ToString() == "6")
                {
                    CtlAgreementPercent111.visibleDelClo = false;
                }
            }

            CtlAgreementPercent111.Bindtbljarime();
        }