Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                CtlAgreePercentProtest1.BindDD();
                //Attribute to show the Plus Minus Button.
                GridView1.HeaderRow.Cells[0].Attributes["data-class"] = "expand";

                //Attribute to hide column in Phone.
                GridView1.HeaderRow.Cells[2].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[3].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[4].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[5].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[6].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[7].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[8].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[9].Attributes["data-hide"]  = "phone";
                GridView1.HeaderRow.Cells[10].Attributes["data-hide"] = "phone";
                GridView1.HeaderRow.Cells[11].Attributes["data-hide"] = "phone";

                //Adds THEAD and TBODY to GridView.
                GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
            }
            catch { }
        }
        public void BindDD()
        {
            DateTime sd = DateTime.Now;
            DateTime ed;

            try
            {
                ClAgreement cl = new ClAgreement();
                DDAgreementID.DataSource     = AgreementClass.GetList(cl);
                DDAgreementID.DataTextField  = "AgreeName";
                DDAgreementID.DataValueField = "AgreementID";
                DDAgreementID.DataBind();

                DDSuperVisorID.DataSource     = TaxiDAL.UsersClass.GetListNazer(null, null, null, null, null, null, "600", null, null, null, null);
                DDSuperVisorID.DataTextField  = "FullNameUser";
                DDSuperVisorID.DataValueField = "UserID";
                DDSuperVisorID.DataBind();

                DDExplainID.Bind();
                CtlAgreePercentProtest1.BindDD();

                Bindtbljarime();

                DDExplainID.AutoPostBackExplan = true;
            }
            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);
            }
        }