Exemplo n.º 1
0
        protected void BtnInsert_Click(Object sender, System.EventArgs e)
        {
            string PeymanId = null;

            if (DDPeymanid.SelectedValue.ToString() != "")
            {
                PeymanId = DDPeymanid.SelectedValue.ToString();
            }
            string LicesnceTypeid = null;

            if (DDLicesnceTypeid.SelectedValue.ToString() != "")
            {
                LicesnceTypeid = DDLicesnceTypeid.SelectedValue.ToString();
            }



            int t = CuttingTreeClass.insert(null, null, null, TXTdate.Text, TXTAddress.Text, null, null, null, null, chkPeyman.Checked.ToString(), PeymanId, DDMantagheId.SelectedValue.ToString(), chkMojavez.Checked, Haghighiid.ToString(), LicesnceTypeid, TXTTitle.Text, TXTDesc.Text, null, null);

            if (t == 0)
            {
                LblMsg.ForeColor = System.Drawing.Color.Red;
                LblMsg.Text      = "خطا در ثبت";
            }
            else
            {
                LblMsg.ForeColor = System.Drawing.Color.Green;
                LblMsg.Text      = "ثبت  انجام شد.";
                BindGrid();
            }
        }
Exemplo n.º 2
0
        public void DeleteItem(object sender, EventArgs e)
        {
            HtmlAnchor temp = (HtmlAnchor)sender;
            int        id   = Int32.Parse(temp.Attributes["GridID"].ToString());

            CuttingTreeClass.Delete(id);
            BindGrid();
            //tbl_Student_Lang.Delete(temp.Attributes["GridID"].ToString());
        }
Exemplo n.º 3
0
        protected void BtnUpdate_Click1(object sender, EventArgs e)
        {
            int i = CuttingTreeClass.Update(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, TXTTitle.Text, TXTDesc.Text, null, null);

            if (i == 0)
            {
                LblMsg.ForeColor = System.Drawing.Color.Red;
                LblMsg.Text      = "خطا";
            }
        }
Exemplo n.º 4
0
 void BindGrid()
 {
     if (Session["PersonalID"] != null)
     {
         string  pid = Session["PersonalID"].ToString();
         DataSet ds  = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, pid, null, null,
                                                null, null, null, null, null, null, null, null);
         gvRequestList.DataSource = ds;
         gvRequestList.DataBind();
     }
 }
Exemplo n.º 5
0
        protected void btnprint_Click1(object sender, EventArgs e)
        {
            DataSet ds = CuttingTreeClass.RepGetList(null, CtlFromDateToDate.FromDate, CtlFromDateToDate.ToDate, DDMantagheId.SelectedValue.ToString());// LicensingTreeClass.GetReportList(null, null, null, CtlFromDateToDate.FromDate, DDLicesnceTypeid.SelectedValue.ToString(), null, null, DDMantagheId.SelectedValue.ToString(), CtlFromDateToDate.ToDate);



            Session["ReportData"] = ds;
            //Response.Redirect("~/Report/ReportTree/ReportViewTree.aspx?RName=ReportTree/Rp_Cutting");

            MyIfarm.Visible = true;

            MyIfarm.Attributes.Add("src", "~/Report/ReportTree/ReportViewTree.aspx?RName=ReportTree/Rp_Cutting");
        }
Exemplo n.º 6
0
        protected void BtnSerach_Click1(object sender, EventArgs e)
        {
            DataSet  ds      = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
            DataView dv      = new DataView(ds.Tables[0]);
            String   StrSort = Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString());

            if (StrSort != null)
            {
                dv.Sort = StrSort;
            }
            GridView1.DataSource = dv;
            GridView1.DataBind();
        }
Exemplo n.º 7
0
        protected void GV_ok(object sender, EventArgs e)
        {
            HtmlAnchor temp       = (HtmlAnchor)sender;
            string     kartableid = temp.Attributes["kartableid"].ToString();
            string     cuttingID  = temp.Attributes["cuttingID"].ToString();

            //tbl_Student_Lang.Update(Value, null, null, null, Kernel.PersonID(), 1, Kernel.UserID());
            try
            {
                CuttingTreeClass.Update(cuttingID, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "1");
                kartable.update(kartableid, null, null, null, null, null, null, null, "1", null);
            }
            catch { }
            BindGrid();
        }
Exemplo n.º 8
0
        //public string Personelid
        //{
        //    get { }
        //    set{}
        //}
        //public string  Haghighiid
        //{
        //    get { }
        //    set { }
        //}

        public void BindGrid()
        {
            DataSet ds = CuttingTreeClass.GetList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);

            if (ds != null)
            {
                DataView dv = new DataView(ds.Tables[0]);
                //if (Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString()) == null)
                //{
                //    ViewState["CuttingTree"] = "id Desc";
                //}
                //dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["CuttingTree"].ToString()).ToString();
                GridView1.DataSource = dv;
                GridView1.DataBind();
            }
        }
Exemplo n.º 9
0
        public void DeleteItem(object sender, System.EventArgs e)
        {
            String id = ((HtmlAnchor)sender).HRef.ToString();
            int    i  = CuttingTreeClass.Delete(Convert.ToInt32(id));

            if (i == 0)
            {
                LblMsg.Text = " error ";
                ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('خطا در حذف');", true);
            }
            else
            {
                BindGrid();
            }
            LightBox.Value = "0";
        }
Exemplo n.º 10
0
        protected void btnErja_Click(object sender, EventArgs e)
        {
            string v      = ddlErja.SelectedValue;
            string userid = v.Split(',')[0];
            string roleid = v.Split(',')[1];
            string status = "";

            //if (roleid == "2") status = "9064";
            //else if (roleid == "3") status = "9065";
            //else if (roleid == "1") status = "9063";
            try
            {
                kartable.Insert(null, roleid, DateTime.Now, userid, Session["roleid"].ToString(), Session["UserID"].ToString(), txtDesc.Text, null, txtid.Text);
                CuttingTreeClass.Update(txtid.Text, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, txtDesc.Text, roleid, "3");
            }
            catch { }
            BindGrid();
        }
Exemplo n.º 11
0
        protected void GV_cancel(object sender, EventArgs e)
        {
            //Button L = (Button)sender;
            //string Value = L.CommandArgument;
            HtmlAnchor temp       = (HtmlAnchor)sender;
            string     kartableid = temp.Attributes["kartableid"].ToString();
            string     cuttingID  = temp.Attributes["cuttingID"].ToString();

            try
            {
                CuttingTreeClass.Update(cuttingID, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "0");
                kartable.update(kartableid, null, null, null, null, null, null, null, "0", null);

                // kartable.Insert(null, Session["roleid"].ToString(), DateTime.Now, Session["UserID"].ToString(), Session["roleid"].ToString(), Session["UserID"].ToString(), txtDesc.Text, "0", ID);
            }
            catch { }
            BindGrid();
        }
Exemplo n.º 12
0
        public void UpItem(object sender, EventArgs e)
        {
            String  id = ((HtmlAnchor)sender).HRef.ToString();
            DataSet ds = CuttingTreeClass.GetList(id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);

            DataRow dr = ds.Tables[0].Rows[0];

            TXTid.Text                 = dr["id"].ToString();
            TXTTitle.Text              = dr["Title"].ToString();
            TXTAddress.Text            = dr["Address"].ToString();
            TXTDesc.Text               = dr["Desc"].ToString();
            DDMantagheId.SelectedValue = dr["MantagheId"].ToString() == "" ? "0" :dr["MantagheId"].ToString();
            string kk = dr["Peyman"].ToString();

            if (dr["Peyman"].ToString() != null && dr["Peyman"].ToString() == "True")
            {
                chkPeyman.Checked        = true;
                DDPeymanid.SelectedValue = dr["Peymanid"].ToString();
                DDPeymanid.Visible       = true;
                lblpeyman.Visible        = true;
            }


            if (dr["Mojavez"].ToString() != null && dr["Mojavez"].ToString() == "True")
            {
                chkMojavez.Checked             = true;
                DDLicesnceTypeid.SelectedValue = dr["LicesnceTypeid"].ToString();
                DDLicesnceTypeid.Visible       = true;
                lblMojavez.Visible             = true;
            }

            TXTdate.Text = dr["date1"].ToString();
            // EmptyLight();
            LightBox.Value    = "1";
            BtnInsert.Visible = false;

            BtnUpdate.Visible = true;
        }
Exemplo n.º 13
0
        protected void btnInsert_Click(object sender, EventArgs e)
        {
            if (Session["PersonalID"] != null)
            {
                string pid = Session["PersonalID"].ToString();
                string hid = "";
                if (Session["HaghighiID"] != null)
                {
                    hid = Session["HaghighiID"].ToString();
                }
                string date = CtlDatePick.Text;

                //int e =Int16.Parse(CtlDatePick.Text.Length - 1);
                //date = CtlDatePick.Text.Remove(10, CtlDatePick.Text.Length - 1);


                int t = CuttingTreeClass.insert(ddlTreeType.SelectedValue, txtCount.Text, txtBon.Text, date, txtAddress.Text,
                                                "", "", ddlStreetType.SelectedValue, pid, null, "", ddRegion.SelectedValue, chkMojavez.Checked, hid,
                                                ddlLicesnceType.SelectedValue, "", "", "4", "9063");



                if (t == 0)
                {
                    LblMsg.ForeColor = System.Drawing.Color.Red;
                    LblMsg.Text      = "خطا در ثبت";
                }
                else
                {
                    LblMsg.ForeColor = System.Drawing.Color.Green;
                    LblMsg.Text      = "ثبت  انجام شد.";
                    kartable.Insert(null, "4", DateTime.Now, "", null, pid, null, "9063", t.ToString());
                    Response.Redirect("RequestList.aspx");
                }
            }
        }
Exemplo n.º 14
0
        public string deleteTree(ClCuttingTree oobbjj)
        {
            string ff = CuttingTreeClass.Delete(Convert.ToInt32(oobbjj.PersonalId)).ToString();

            return(ff);
        }