Пример #1
0
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        ObjProperty.SpecId = Convert.ToInt32(txtSpecimanNo.Text);
        ObjProperty.R1     = "Delete";
        int SpecNo;
        int SpecMax;

        ObjProperty.Details = "<tr></tr>";
        ObjBAL.Idv_Chetana_Save_Godown_Speciman_Head(ObjProperty, out SpecMax, out SpecNo);
        MessageBox("Record delete successfully speciman no is " + SpecNo.ToString());
        btnDelete.Visible = false;
        Clear();
        txtSpecimanNo.Text = SpecMax.ToString();
    }
Пример #2
0
    private void SaveDetails()
    {
        try
        {
            string OrderDate = txtSpecDate.Text.Split('/')[0] + "/" + txtSpecDate.Text.Split('/')[1] + "/" + txtSpecDate.Text.Split('/')[2];

            if (txtLrDate.Text.Trim() == "")
            {
                txtLrDate.Text = "01/01/1999";
            }
            string LrDate = txtLrDate.Text.Split('/')[0] + "/" + txtLrDate.Text.Split('/')[1] + "/" + txtLrDate.Text.Split('/')[2];

            int SpecNo;
            int SpecMax;
            ObjProperty.SpecId         = Convert.ToInt32(lblSpecId.Text);
            ObjProperty.SpecSeqNo      = Convert.ToInt32(txtSpecimanNo.Text);
            ObjProperty.SpeDate        = Convert.ToDateTime(OrderDate);
            ObjProperty.BranchCode     = txtBranch.Text.ToString().Split(':')[0].ToString();
            ObjProperty.BranchName     = txtBranch.Text;
            ObjProperty.TranspotCode   = txttransporter.Text.ToString().Split(':')[0].ToString();
            ObjProperty.TranspportName = txttransporter.Text;
            ObjProperty.NoOfParcels    = Convert.ToInt32(txtNoOfParcels.Text == "" ? "0" : txtNoOfParcels.Text);
            ObjProperty.Remark         = txtRemark.Text;
            ObjProperty.valueOfGood    = float.Parse(txtValOfGoods.Text);
            ObjProperty.SendBy         = txtSentBy.Text;
            ObjProperty.LRNO           = txtLRNo.Text;
            ObjProperty.LDDate         = Convert.ToDateTime(LrDate);
            ObjProperty.Paid           = Convert.ToInt32(rdoPaidStaus.SelectedValue);
            ObjProperty.Delivery       = Convert.ToInt32(chIsDelivery.Checked == true ? 1 : 0);
            ObjProperty.FY             = Convert.ToInt32(strFY);
            ObjProperty.CreatedBy      = UserName;
            ObjProperty.Details        = getDetailXml();
            ObjBAL.Idv_Chetana_Save_Godown_Speciman_Head(ObjProperty, out SpecMax, out SpecNo);
            MessageBox("Record save successfully Speciman No is  " + SpecMax.ToString());
            grdTemp.Visible    = false;
            txtSpecimanNo.Text = SpecNo.ToString();
            SpecPrint          = SpecMax;
            lblSpecId.Text     = "0";
        }
        catch (Exception ex)
        {
            MessageBox(ex.ToString());
            throw;
        }
    }