예제 #1
0
 protected void btnTaxConfig_Clcik(object sender, EventArgs e)
 {
     try
     {
         TAXBLL            _txtbll           = new TAXBLL();
         HRM_LiabilityType _TaxLiabilityType = new HRM_LiabilityType();
         _TaxLiabilityType.Type      = txtbxTaxLiablityType.Text.Trim();
         _TaxLiabilityType.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId;
         _TaxLiabilityType.EDIT_DATE = DateTime.Now;
         _TaxLiabilityType.OCODE     = ((SessionUser)Session["SessionUser"]).OCode;
         if (btnTaxConfig.Text == "Submit")
         {
             int result = _txtbll.TAXTypeSave(_TaxLiabilityType);
             if (result == 1)
             {
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Save successfully')", true);
             }
         }
         else
         {
             _TaxLiabilityType.TAXTypeAutoID = Convert.ToInt16(hidTaxId.Value);
             int result = _txtbll.TAXTypeUpdate(_TaxLiabilityType);
             if (result == 1)
             {
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Update successfully')", true);
             }
         }
         GetTaxConfig();
         ClearUI();
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
     }
 }
예제 #2
0
        protected void imgbtnTypeEdit_Click(object sender, EventArgs e)
        {
            TAXBLL            _txtbll           = new TAXBLL();
            HRM_LiabilityType _TaxLiabilityType = new HRM_LiabilityType();
            ImageButton       imgbtn            = (ImageButton)sender;
            GridViewRow       row = (GridViewRow)imgbtn.NamingContainer;

            try
            {
                string txttypeId  = "";
                Label  lblTaxType = (Label)grdTaxType.Rows[row.RowIndex].FindControl("lblTaxType");
                if (lblTaxType != null)
                {
                    string OCODE = ((SessionUser)Session["SessionUser"]).OCode;
                    txttypeId         = lblTaxType.Text;
                    _TaxLiabilityType = _txtbll.getTaxTypeByTaxIdandocode(txttypeId, OCODE);

                    if (_TaxLiabilityType != null)
                    {
                        hidTaxId.Value            = _TaxLiabilityType.TAXTypeAutoID.ToString();
                        txtbxTaxLiablityType.Text = _TaxLiabilityType.Type.ToString();
                        if (btnTaxConfig.Text == "Submit")
                        {
                            btnTaxConfig.Text = "Update";
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }
예제 #3
0
        internal int TAXTypeUpdate(HRM_LiabilityType _TaxLiabilityType)
        {
            HRM_LiabilityType obj = _context.HRM_LiabilityType.First(x => x.TAXTypeAutoID == _TaxLiabilityType.TAXTypeAutoID);

            obj.Type      = _TaxLiabilityType.Type;
            obj.EDIT_USER = _TaxLiabilityType.EDIT_USER;
            obj.EDIT_DATE = _TaxLiabilityType.EDIT_DATE;
            _context.SaveChanges();
            return(1);
        }
예제 #4
0
 internal int TAXTypeUpdate(HRM_LiabilityType _TaxLiabilityType)
 {
     return(_taxdal.TAXTypeUpdate(_TaxLiabilityType));
 }
예제 #5
0
 internal int TAXTypeSave(HRM_LiabilityType _TaxLiabilityType)
 {
     _context.HRM_LiabilityType.AddObject(_TaxLiabilityType);
     _context.SaveChanges();
     return(1);
 }