public void Save()
        {
            try
            {
                tbl_ItmPricing itmpricin = new tbl_ItmPricing();

                itmpricin.ItmPriID   = HFItmPriID.Value;
                itmpricin.EffDat     = string.IsNullOrEmpty(TBEffDat.Value) ? null : TBEffDat.Value;
                itmpricin.ProductID  = string.IsNullOrEmpty(DDLProID.SelectedValue) ? null : DDLProID.SelectedValue;
                itmpricin.CustomerID = string.IsNullOrEmpty(DDLCusID.SelectedValue) ? null : DDLCusID.SelectedValue;
                itmpricin.itmpri_Qty = string.IsNullOrEmpty(TBitmpriQty.Text) ? null : TBitmpriQty.Text;
                itmpricin.unt_cost   = string.IsNullOrEmpty(TBuntcost.Text) ? null : TBuntcost.Text;
                itmpricin.cost       = string.IsNullOrEmpty(TBCost.Text) ? null : TBCost.Text;
                itmpricin.crtd_by    = Session["user"].ToString();
                itmpricin.crtd_at    = DateTime.Today;

                tbl_ItmPricingManager itmpricinmanag = new tbl_ItmPricingManager(itmpricin);
                itmpricinmanag.Save();
            }
            catch (Exception ex)
            {
                throw ex;
                //ScriptManager.RegisterStartupScript(this, this.GetType(), "isActive", "Alert();", true);
            }
        }
Example #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            tbl_ItmPricing ItmPricing = obj as tbl_ItmPricing;

            if (ItmPricing == null)
            {
                return(false);
            }

            if (this.ItmPriID == ItmPricing.ItmPriID)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
 public tbl_ItmPricingManager(tbl_ItmPricing _tbl_ItmPricing)
 {
     tbl_ItmPricing = _tbl_ItmPricing;
 }