Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ClArchiveAgreeTitle cl = new ClArchiveAgreeTitle();

            cl = Data;
            int i = 0;

            if (CSharp.PublicFunction.ModeInsert(lblArchiveAgreeTitle.Text))
            {
                i = ArchiveAgreeTitleClass.insert(cl);
                if (i > 0)
                {
                    InsertArchiv(i);
                }
            }
            else
            {
                i = ArchiveAgreeTitleClass.Update(cl);
            }


            if (i > 0)
            {
                BindGrid();
            }
            else
            {
                CSharp.Utility.ShowMsg(Page, CSharp.ProPertyData.MsgType.warning, "خطا در ثبت");
            }
        }
Exemplo n.º 2
0
        public void BindDD()
        {
            ClArchiveAgreeTitle cl = new ClArchiveAgreeTitle();

            cl.AgreeID               = Agreement;
            ddarchive.DataSource     = ArchiveAgreeTitleClass.GetList(cl);
            ddarchive.DataTextField  = "AgreeName";
            ddarchive.DataValueField = "tbl_ArchiveAgreeTitle";
            ddarchive.DataBind();
        }
Exemplo n.º 3
0
        public void DeleteItem(object sender, System.EventArgs e)
        {
            String AgreePercentProtestID = ((HtmlAnchor)sender).HRef.ToString();

            int i = ArchiveAgreeTitleClass.Delete(AgreePercentProtestID);

            if (i == 0)
            {
                ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('خطا در حذف');", true);
            }
            else
            {
                BindGrid();
            }
        }
Exemplo n.º 4
0
        private void BindGrid()
        {
            ClArchiveAgreeTitle cl = new ClArchiveAgreeTitle();

            cl.AgreeID = Convert.ToInt32(lblAgrement.Text);

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

            if (ViewState["AreaID "] == null)
            {
                ViewState["AreaID"] = "tbl_ArchiveAgreeTitle Desc";
            }

            dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["AreaID"].ToString()).ToString();
            GridView1.DataSource = dv;
            GridView1.DataBind();
        }