Ejemplo n.º 1
0
 internal int Insert(LC_Invoice_Create objInvoice)
 {
     try
     {
         _Context.LC_Invoice_Create.AddObject(objInvoice);
         _Context.SaveChanges();
         return(1);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 2
0
        //private void FillSeason(string PoOrder)
        //{
        //    try
        //    {
        //        string ocode = ((SessionUser)Session["SessionUser"]).OCode;
        //        var row = _orderSheetbll.GetOrderEntryByPoOrder(PoOrder);
        //        if (row.Count > 0)
        //        {
        //            ddlPoOrder.DataSource = row.ToList();
        //            ddlPoOrder.DataBind();
        //            ddlPoOrder.AppendDataBoundItems = false;
        //            ddlPoOrder.Items.Insert(0, new ListItem("--Select Item Category--", "0"));
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}



        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                LC_Invoice_Create invoice = new LC_Invoice_Create();
                //invoice.BayerName = ddlBayer.SelectedValue.ToString();
                invoice.Consignee   = txtConsignee.Text;
                invoice.NotifyParty = txtNotifyParty.Text;
                // invoice.ERCNo = txtERCNO.Text;
                // invoice.DT = Convert.ToDateTime(txtDt.Text);
                // invoice.VatReg = txtVatReg.Text;
                invoice.InvoiceNo         = txtInvoiceNo.Text;
                invoice.InvoiceDate       = Convert.ToDateTime(txtinvoiceDate.Text);
                invoice.EXPNo             = txtExpNo.Text;
                invoice.EXPDate           = Convert.ToDateTime(txtExpDate.Text);
                invoice.LCNo              = ddlLCNo.Text;
                invoice.LCDate            = Convert.ToDateTime(txtLCDate.Text);
                invoice.IssuingBank       = txtIssueBank.Text;
                invoice.DeliveryAddress   = txtDeliveryAddress.Text;
                invoice.OriginatedCountry = txtOriginatedCountry.Text;
                invoice.Destination       = txtDestination.Text;
                invoice.Season            = ddlSeason.SelectedItem.Text;
                invoice.OrderNo           = ddlPoOrder.SelectedItem.Text;
                //invoice.Article = ddlArticle.SelectedItem.Text;
                // invoice.Style = ddlStyle.SelectedItem.Text;
                // invoice.Haldensleben = txtHealdensleben.Text;
                // invoice.CNo = txtCNo.Text;
                //invoice.TotalCTNS = Convert.ToDouble(txtTotalCTNS.Text);
                // invoice.GrossWGT =Convert.ToDouble( txtGROSSWGT.Text);
                // invoice.NetWGT =Convert.ToDouble( txtNETWGT.Text);
                // invoice.Cubic =Convert.ToDouble( txtCUBIC.Text);

                int result = _InvoiceDAL.Insert(invoice);
                if (result == 1)
                {
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Saved Successfully')", true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
 internal int Insert(LC_Invoice_Create objInvoice)
 {
     return(invoiceDAL.Insert(objInvoice));
 }