Beispiel #1
0
        private void BindPeyman2()
        {
            ClPeyman cl = new ClPeyman();
            DataSet  ds = PeymanClass.GetList(cl);

            ddPeyman.DataSource     = ds;
            ddPeyman.DataTextField  = "PeymanName";
            ddPeyman.DataValueField = "PeymanID";
            ddPeyman.DataBind();
            if (ddagree.SelectedValue != "0")
            {
                //ClPeymanPark cl2 = new ClPeymanPark();
                //cl2.AgreementID = Convert.ToInt32(ddPeyman.SelectedValue);
                //DataSet ds2 = PeymanParkClass.GetList(cl2);
                //ddPeyman2.SelectedValue = ds2.Tables[0].Rows[0]["PeymanID"].ToString();
                //ddPeyman2.Enabled = false;
                ClAgreement cl2 = new ClAgreement();
                cl2.AgreementID = Convert.ToInt32(ddagree.SelectedValue);
                DataSet ds2 = AgreementClass.GetList(cl2);
                if (ds2.Tables[0].Rows.Count > 0)
                {
                    ddPeyman.SelectedValue = ds2.Tables[0].Rows[0]["PeymanID"].ToString();
                }
                ddPeyman.Enabled = false;
            }
            else
            {
                ddPeyman.Enabled = true;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ClAgreement cl = new ClAgreement();


                cl.AgreementID = Convert.ToInt32(Request.QueryString["aid"].ToString());
                DataSet ds = AgreementClass.GetList(cl);
                DataRow dr = ds.Tables[0].Rows[0];

                lblactive.Text                 = dr["StatusName"].ToString();
                lblFulname.Text                = dr["AgreementID"].ToString() + " " + dr["FullName"].ToString();
                lblPeymanIDName.Text           = dr["PeymanName"].ToString();
                lblStatrtDateAgreement.Text    = DateConvert.m2sh(dr["StatrtDateAgreement"].ToString()).ToString();
                lblsupervisorStaticIDName.Text = dr["SuperVisorName"].ToString();
                //LBlPayePrice.Text = dr[""].ToString();
                //LBlMablagh.Text = dr[""].ToString();
                LBLPeymankarName.Text = dr["PeymanKarIDName"].ToString();

                if (dr["StatusID"].ToString() == "1")
                {
                    lblactive.ForeColor = System.Drawing.Color.Green;
                }
                else
                {
                    lblactive.ForeColor = System.Drawing.Color.Red;
                }
            }
        }
Beispiel #3
0
        public string UserPeyman(string UserName, string Password)
        {
            var hash = FormsAuthentication.HashPasswordForStoringInConfigFile(Password + "~!@", "MD5");

            try
            {
                DataSet ds = TaxiDAL.UsersClass.GetList(null, UserName, hash, null, null, null, null, null, null, null, null, null);
                DataRow dr = ds.Tables[0].Rows[0];

                ClAgreement cl = new ClAgreement();
                if (dr["semat"].ToString() == "1")            //user is peymankar
                {
                    cl.PeymanKarID = Convert.ToInt32(dr["userid"]);
                }
                else
                {
                    cl.supervisor2ID = Convert.ToInt32(dr["userid"]);
                }


                DataSet dspeyman = AgreementClass.GetList(cl);
                return(dspeyman.GetXml());
            }
            catch {
                return(null);
            }
        }
Beispiel #4
0
        private void BindPeyman(string i = "0")
        {
            ClPeyman cl = new ClPeyman();

            if (Request.QueryString["aid"] != "")
            {
                ClAgreement CL2 = new ClAgreement();
                CL2.AgreementID = Convert.ToInt32(Request.QueryString["aid"]);
                DataSet DSSS = AgreementClass.GetList(CL2);
                DDPeymanSelect.DataSource     = PeymanClass.GetList(cl);
                DDPeymanSelect.DataTextField  = "PeymanName";
                DDPeymanSelect.DataValueField = "PeymanID";
                DDPeymanSelect.DataBind();
            }
            else
            {
                cl.PeymanID = 0;



                DDPeymanSelect.DataSource     = PeymanClass.GetList(cl);
                DDPeymanSelect.DataTextField  = "PeymanName";
                DDPeymanSelect.DataValueField = "PeymanID";
                DDPeymanSelect.DataBind();
            }

            DDPeymanSelect.Items.Insert(0, new ListItem("پیش فرض", "0"));
        }
Beispiel #5
0
        protected void BtnSerach_Click(object sender, EventArgs e)
        {
            DataSet ds = AgreementClass.GetList(Data);

            GridView1.DataSource = ds;
            GridView1.DataBind();
            LightBox.Value = "0";
        }
Beispiel #6
0
        private int GetPeymanAgreement(int agreeid)
        {
            ClAgreement cl = new ClAgreement();

            cl.AgreementID = agreeid;
            DataSet ds = AgreementClass.GetList(cl);
            DataRow dr = ds.Tables[0].Rows[0];

            return(Convert.ToInt32(dr["PeymanID"].ToString()));
        }
Beispiel #7
0
        private void BindDD()
        {
            ClAgreement cl = new ClAgreement();
            DataSet     ds = AgreementClass.GetList(cl);

            ddagree.DataSource     = ds;
            ddagree.DataTextField  = "AggreeName";
            ddagree.DataValueField = "AgreementID";
            ddagree.DataBind();
            ddagree.Items.Insert(0, new ListItem("پیش فرض", "0"));

            BindPeyman2();
        }
Beispiel #8
0
        public void BindGrid()
        {
            ClAgreement cl = new ClAgreement();

            DataSet  ds = AgreementClass.GetList(cl);
            DataView dv = new DataView(ds.Tables[0]);

            if (ViewState["AgreementID"] == null)
            {
                ViewState["AgreementID"] = "AgreementID Desc";
            }
            dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["AgreementID"].ToString()).ToString();
            GridView1.DataSource = dv;
            GridView1.DataBind();
        }
        public void BindDD()
        {
            DDExplanID.Bind();
            //DDExplanID.Attributes.Add();
            ClAgreement cl = new ClAgreement();

            DDAgreementID.DataSource     = AgreementClass.GetList(cl);
            DDAgreementID.DataTextField  = "AgreeName";
            DDAgreementID.DataValueField = "AgreementID";
            DDAgreementID.DataBind();
            if (NotDefaultAgree)
            {
                DDAgreementID.Items.Insert(0, new ListItem("پیش فرض", "0"));
            }
            BindSubject();
        }
Beispiel #10
0
        protected void ddAgreeTamdid_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(ddAgreeTamdid.SelectedValue) > 0)
            {
                ClAgreement cl = new ClAgreement();
                cl.AgreementID = Convert.ToInt32(ddAgreeTamdid.SelectedValue);
                DataSet ds = AgreementClass.GetList(cl);
                DataRow dr = ds.Tables[0].Rows[0];

                DDPeymanID.SelectedValue           = dr["PeymanID"].ToString();
                DDPeymanKarID.SelectedValue        = dr["PeymanKarID"].ToString();
                DDsupervisor2ID.SelectedValue      = dr["supervisor2ID"].ToString();
                DDsupervisor3ID.SelectedValue      = dr["supervisor3ID"].ToString();
                DDMasterGreenSpaceID.SelectedValue = dr["MasterGreenSpaceID"].ToString();
                DDsupervisorStaticID.SelectedValue = dr["supervisorStaticID"].ToString();
            }
        }
Beispiel #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                dAgree.Visible = false;
                if (Request.QueryString["RName"] == null)
                {
                    return;
                }

                if (Request.QueryString["RName"].ToString() == "Rp_SubjectPrice" ||
                    Request.QueryString["RName"].ToString() == "Rp_Percent" ||
                    Request.QueryString["RName"].ToString() == "Rp_Area" ||
                    Request.QueryString["RName"].ToString() == "Rp_Price2" ||
                    Request.QueryString["RName"].ToString() == "Rp_Khesarat" ||
                    Request.QueryString["RName"].ToString() == "rp_khesart3" ||
                    Request.QueryString["RName"].ToString() == "Rp_Park" ||
                    Request.QueryString["RName"].ToString() == "Rp_ExplainPrice2"

                    )
                {
                    ClAgreement cl = new ClAgreement();
                    ddAgree.DataSource     = AgreementClass.GetList(cl);
                    ddAgree.DataTextField  = "AggreeName";
                    ddAgree.DataValueField = "AgreementID";
                    ddAgree.DataBind();
                    ddAgree.Items.Insert(0, new ListItem("پیش فرض", "0"));
                    dAgree.Visible = true;
                }
                ctlArchiveDD.BindDD();


                if (Request.QueryString["RName"].ToString() == "SumPay" ||
                    Request.QueryString["RName"].ToString() == "SumPay2" ||
                    Request.QueryString["RName"].ToString() == "RptSumPayPage"
                    )
                {
                    dsubject.Visible            = true;
                    CtlAllSubjectExplan.BindAll = "1";
                    CtlAllSubjectExplan.BindDD();
                }
            }
        }
Beispiel #12
0
        private void checkTamdid()
        {
            bool ch = chIsTamdid.Checked;


            DDPeymanID.Enabled    = !ch;
            DDPeymanKarID.Enabled = !ch;
            trtamdidAgree.Visible = ch;

            if (ddAgreeTamdid.Items.Count == 0)
            {
                ClAgreement cl = new ClAgreement();

                ddAgreeTamdid.DataSource     = AgreementClass.GetList(cl);
                ddAgreeTamdid.DataTextField  = "AggreeName";
                ddAgreeTamdid.DataValueField = "AgreementID";
                ddAgreeTamdid.DataBind();
                ddAgreeTamdid.Items.Insert(0, new ListItem("انتخاب نمایید", "0"));
            }
        }
        public void BindDD()
        {
            ddSubjectFilter.DataSource     = TaxiDAL.CatalogClass.GetListTypeID("3");
            ddSubjectFilter.DataTextField  = "CatalogName";
            ddSubjectFilter.DataValueField = "CatalogValue";
            ddSubjectFilter.DataBind();

            ClAgreement cl = new ClAgreement();

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

            if (NotDefaultAgree)
            {
                DDAgreementID.Items.Insert(0, new ListItem("پیش فرض", "0"));
            }

            DDExplanID.Bind();

            YearMonthShow();
        }
        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);
            }
        }