Beispiel #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            bool   isSaved = false;
            GRNBLL obj     = new GRNBLL();

            obj.Id                = new Guid(this.hfGRNID.Value.ToString());
            obj.ClientId          = new Guid(this.hfClientId.Value.ToString());
            obj.BagTypeId         = new Guid(this.hfBagTypeId.Value.ToString());
            obj.GRNTypeId         = new Guid(this.cboGRNType.SelectedValue.ToString());
            obj.DateDeposited     = DateTime.Parse(this.lblDateDeposited.Text);
            obj.TotalNumberOfBags = int.Parse(this.lblBags.Text);
            obj.GrossWeight       = float.Parse(this.lblGrossWeight.Text);
            obj.NetWeight         = float.Parse(this.lblNetWeight.Text);
            obj.OriginalQuantity  = float.Parse(this.lblOriginalQuantity.Text);
            obj.CurrentQuantity   = obj.OriginalQuantity;
            obj.TrackingNo        = ViewState["ReCreateGRNTrackingNo"].ToString();
            isSaved               = obj.ReCreateGRN();

            if (isSaved == true)
            {
                this.lblmsg.Text = "GRN Re-Created Successfully";
                return;
            }
            else
            {
                this.lblmsg.Text = "Unable to Re-create GRN";
                return;
            }
        }