示例#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 Setpeymankar()
 {
     GridView1.Columns[1].Visible = false;
     GridView1.Columns[2].Visible = false;
     BtnInsert.Visible            = false;
     btnSerachLight.Visible       = false;
     //  btninsetlightmain.visible = false;
     btninsetlightmain.Visible = false;
     CtlAgreePercentProtest1.SetPeymankar2();
 }
        public void ProtestItem(object sender, EventArgs e)
        {
            String AgreementPercentID = ((HtmlAnchor)sender).HRef.ToString();

            CtlAgreePercentProtest1.AgreementPercentID = Convert.ToInt32(AgreementPercentID);

            // CtlAgreePercentProtest1.BindDD();
            CtlAgreePercentProtest1.BindGrid();

            //LblParamAgreementPercentID.Text = AgreementPercentID;
            //ClAgreementPercent cl = new ClAgreementPercent();
            //cl.AgreementPercentID = Convert.ToInt32(AgreementPercentID);
            //Data = cl;
            LightBox2.Value = "1";
        }
        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);
            }
        }