private void GetOrderDetails()
        {
            string query = "Select PurchaseOrderDetails.ItemName,PurchaseOrderDetails.ItemID,PurchaseOrderDetails.ComodityCode,PurchaseOrderDetails.Unit,PurchaseOrderDetails.qty,PurchaseOrder.PurchaseOrderNo,PurchaseOrder.OrderDate,PurchaseOrder.LedgerID from PurchaseOrder" +
                           " inner join PurchaseOrderDetails on PurchaseOrder.OrderId=PurchaseOrderDetails.OrderId where PurchaseOrder.OrderId='" + mOrderid + "'";
            DataTable dt = SQLHelper.GetInstance().ExcuteNonQuery(query, out msg);

            if (dt.IsValidDataTable())
            {
                object orderno = dt.Rows[0]["PurchaseOrderNo"];
                lblOrderNo.Text  = orderno.ISValidObject() ? orderno.ToString() : "Not Assign";
                lblOrderate.Text = DateTime.Parse(dt.Rows[0]["OrderDate"].ToString()).ToString("dd-MMM-yyyy");
                mLedgerId        = dt.Rows[0]["LedgerId"].ToString();
                string ledgerName = "";
                Supplier._DicSuppliers.TryGetValue(mLedgerId, out ledgerName);
                lblSupplierName.Text = ledgerName;

                string itemName = dt.Rows[0]["ItemName"].ToString();
                mitemid = dt.Rows[0]["ItemID"].ToString();
                string hsnCode = dt.Rows[0]["ComodityCode"].ToString();
                string unit    = dt.Rows[0]["Unit"].ToString();
                string qty     = dt.Rows[0]["qty"].ToString();
                GetOrgBillingAndShippingDetails();
                GetSupplierDetails(mLedgerId);
                if (mIsRegular)
                {
                    ItemTools.GetItemGSTRateIsiGst(mitemid, mIsIGST, out mcgstrate, out msgstrate, out migstrate, out mcessrate);
                }
                dgvItemList.Rows.Add(1, mitemid, itemName, hsnCode, qty, unit, "", "", "", "", "", mcgstrate, "", msgstrate, "", migstrate, ""
                                     , mcessrate, "", "");
            }
        }
Beispiel #2
0
        private void GetOrderDetails()
        {
            string query = "Select SalesOrderDetails.ItemName,SalesOrderDetails.ItemID,SalesOrderDetails.ComodityCode,SalesOrderDetails.Unit,SalesOrderDetails.qty,SalesOrderDetails.Rate,salesorder.CustomerOrderNo,salesorder.OrderDate,salesorder.LedgerID,salesorder.TotalAmount from salesorder" +
                           " inner join SalesOrderDetails on SalesOrder.OrderId=SalesOrderDetails.orderid where SalesOrder.OrderId='" + mOrderid + "'";
            DataTable dt = SQLHelper.GetInstance().ExcuteNonQuery(query, out msg);

            if (dt.IsValidDataTable())
            {
                object orderno = dt.Rows[0]["CustomerOrderNo"];
                lblOrderNo.Text    = orderno.ISValidObject() ? orderno.ToString() : "Not Assign";
                lblOrderate.Text   = DateTime.Parse(dt.Rows[0]["OrderDate"].ToString()).ToString("dd-MMM-yyyy");
                mLedgerId          = dt.Rows[0]["LedgerId"].ToString();
                lblOrdervalue.Text = dt.Rows[0]["TotalAmount"].ToString();
                string ledgerName = "";
                Customertools._DicCustomers.TryGetValue(mLedgerId, out ledgerName);
                lblCustomername.Text = ledgerName;
                GetCustomerAddressDetails(mLedgerId);
                GetCustomerShippedDetails(mLedgerId);

                string itemName = dt.Rows[0]["ItemName"].ToString();
                mitemid = dt.Rows[0]["ItemID"].ToString();
                string hsnCode = dt.Rows[0]["ComodityCode"].ToString();
                string unit    = dt.Rows[0]["Unit"].ToString();
                string qty     = dt.Rows[0]["qty"].ToString();
                string rate    = dt.Rows[0]["Rate"].ToString();
                ItemTools.GetItemGSTRateIsiGst(mitemid, mIsIGST, out mcgstrate, out msgstrate, out migstrate, out mcessrate);
                dgvItemList.Rows.Add(1, mitemid, itemName, hsnCode, qty, unit, rate, "", "", "", "", mcgstrate, "", msgstrate, "", migstrate, ""
                                     , mcessrate, "", "");
            }
        }