コード例 #1
0
        void FrmLookup_LookupSelected(object sender, EventArgs e)
        {
            System.Data.DataRow vEntity = frmLookup.SelectedEntity;

            switch (lookupColName)
            {
            case UPVC_INVOICEITEMS.PRODUCT_ID:
                if (vEntity == null)
                {
                    editgrid[UPVC_INVOICEITEMS.PRODUCT_ID, lookupRow].Value = "";
                }
                else
                {
                    editgrid[UPVC_INVOICEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[PRODUCT.PRODUCT_NAME];

                    editgrid[UPVC_INVOICEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_NAME] + "");
                    editgrid[UPVC_INVOICEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_NAME] + "");
                }
                break;

            case UPVC_INVOICEITEMS.PCRATE:
                if (vEntity == null)
                {
                    editgrid[UPVC_INVOICEITEMS.PCRATE, lookupRow].Value = "";
                }
                else
                {
                    editgrid[UPVC_INVOICEITEMS.PCRATE, lookupRow].Value = vEntity[UPVC_INVOICEITEMS.PCRATE];
                }
                break;


            case UPVC_INVOICEITEMS.MSM:
                if (vEntity == null)
                {
                    editgrid[UPVC_INVOICEITEMS.MSM, lookupRow].Value = "";
                }
                else
                {
                    editgrid[UPVC_INVOICEITEMS.MSM, lookupRow].Value = vEntity[UPVC_INVOICEITEMS.MSM];
                }
                break;
            }
        }
コード例 #2
0
        void FrmLookup_LookupSelected(object sender, EventArgs e)
        {
            System.Data.DataRow vEntity = frmLookup.SelectedEntity;

            switch (lookupColName)
            {
            //case PURCHASEITEMS.PO_ID:
            //    if (vEntity == null)
            //    {
            //        editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = "";
            //    }
            //    else
            //    {
            //        if (Customise.Purchase_poid_dcid == true)
            //        {
            //            editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = vEntity[PO.PO_NO];
            //            if (vEntity[PO.PO_NO] + "" != Core.Without_Po)
            //            {
            //                editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = vEntity[DC.DC_NO];
            //                editgrid[PURCHASEITEMS.DCITEMS_ID, lookupRow].Value = vEntity[DCITEMS.DCITEMS_ID];
            //                editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[DCITEMS.PRODUCT_ID];
            //                editgrid[PURCHASEITEMS.QTY, lookupRow].Value = vEntity[DCITEMS.QTY];
            //                editgrid[PURCHASEITEMS.PRICE, lookupRow].Value = vEntity[POITEMS.PRICE];

            //                if (txt_taxtype_id.Text == "SGST")
            //                {
            //                    editgrid[PURCHASEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
            //                    editgrid[PURCHASEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
            //                }
            //                else if (txt_taxtype_id.Text == "IGST")
            //                {
            //                    editgrid[PURCHASEITEMS.IGST_PERCENT, lookupRow].Value = Ccoreplus.GetIgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
            //                }
            //                editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRICE, lookupRow];
            //            }
            //            else
            //            {
            //                editgrid.CurrentCell = editgrid[PURCHASEITEMS.PO_ID, lookupRow];
            //            }
            //        }

            //    }
            //    break;
            ////
            //case PURCHASEITEMS.DC_ID:
            //    if (vEntity == null)
            //    {
            //        editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = "";
            //    }
            //    else
            //    {
            //        if (Customise.Purchase_poid_dcid == true)
            //        {
            //            editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = vEntity[DC.DC_NO];
            //            if (vEntity[DCITEMS.DC_NO] + "" != Core.Without_Dc)
            //            {
            //                editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = Core.Without_Po;
            //                //editgrid[PURCHASEITEMS.DCITEM_ID, lookupRow].Value = vEntity[Dc_item.DC_ITEM_ID];
            //                editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[DCITEMS.PRODUCT_ID];
            //                editgrid[PURCHASEITEMS.QTY, lookupRow].Value = vEntity[DCITEMS.REFERED_QTY];
            //                editgrid[PURCHASEITEMS.PRICE, lookupRow].Value = vEntity[POITEMS.PRICE];

            //                editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow];
            //            }
            //            else
            //            {
            //                editgrid.CurrentCell = editgrid[PURCHASEITEMS.DC_ID, lookupRow];
            //            }
            //        }
            //    }
            //    break;

            case PURCHASEITEMS.PRODUCT_ID:
                if (vEntity == null)
                {
                    editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = "";
                }
                else
                {
                    //if (Customise.Purchase_poid_dcid == true)
                    //{
                    //    editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = Core.Without_Po;
                    //    editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = Core.Without_Dc;
                    //}

                    editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[PRODUCT.PRODUCT_NAME];
                    editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow];

                    if (txt_taxtype_id.Text == "SGST")
                    {
                        editgrid[PURCHASEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
                        editgrid[PURCHASEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
                    }
                    else if (txt_taxtype_id.Text == "IGST")
                    {
                        editgrid[PURCHASEITEMS.IGST_PERCENT, lookupRow].Value = Ccoreplus.GetIgst_Name(vEntity[PRODUCT.PRODUCT_ID] + "");
                    }
                }
                break;
            }
        }