Exemplo n.º 1
0
        public DataTable getexpiredWHRsOnTruck(Guid WarehouseID)
        {
            WarehouseBaseModel con = new WarehouseBaseModel();

            return(SQLHelper.getDataTable(con.CDConnectionString, "getexpiredWHRsOnTruck", WarehouseID));
        }
Exemplo n.º 2
0
        public void Save2()
        {
            //drived from CD SaveWareHouseReciept
            double          WeightBeforeMoisture = NetWeight;
            double          lossAmount           = 0;
            ECXLookup       ecxlookup            = new ECXLookup();
            CCommodityGrade CG        = ecxlookup.GetCommodityGrade(EnglishGuid, CommodityGradeId);
            CCommodityClass CC        = ecxlookup.GetCommodityClass(EnglishGuid, CG.CommodityClassUniqueIdentifier);
            bool            DeductMLA = false;

            //sesame
            if (CC.CommodityUniqueIdentifier.ToString().ToLower() == "d97fd8c1-8916-4e3d-89e2-bd50d556a32f".ToLower())
            {
                //TODO:GET FROM WEBSERVICE
                lossAmount = 0.0015;
                DeductMLA  = true;
            }//coffee
            else if (CC.CommodityUniqueIdentifier.ToString().ToLower() == "71604275-df23-4449-9dae-36501b14cc3b".ToLower())
            {
                DeductMLA  = true;
                lossAmount = 0.001376;
            }
            else
            {
                lossAmount = 0;
                DeductMLA  = false;
            }

            NetWeight = (float)((Math.Round(this.NetWeight * 10000)) / 10000);
            double netWeightLoss = 0;


            if (DeductMLA)
            {
                netWeightLoss = NetWeight - (lossAmount * NetWeight);
                //netweightlosshalfbag=NetWeightWithHalfBagWeight-(
            }
            else
            {
                netWeightLoss = NetWeight;
            }

            NetWeight = netWeightLoss;
            NetWeightWithHalfBagWeight = Math.Round(Convert.ToDecimal(NetWeight) + HalfBagWeight, 4);

            OriginalQuantity     = (float)(Math.Round(OriginalQuantity * 10000, 0)) / 10000;
            CurrentQuantity      = (float)(Math.Round(CurrentQuantity * 10000, 0)) / 10000;
            WeightBeforeMoisture = (float)(Math.Round(WeightBeforeMoisture * 10000, 0)) / 10000;
            GrossWeight          = (float)(Math.Round(GrossWeight * 10000, 0)) / 10000;

            OriginalQuantity = Math.Round(OriginalQuantity, 4);
            CurrentQuantity  = Math.Round(CurrentQuantity, 4);

            //string WRStatus="New",Source="Manual";

            int WRStatus = 1, Source = 1;
            WarehouseBaseModel con    = new WarehouseBaseModel();
            string             constr = con.CDConnectionString;

            SQLHelper.execNonQuery(con.CDConnectionString, "tblWarehouseReciept_Insert2",
                                   GRNId, GRNNumber, CommodityGradeId, WarehouseId, BagTypeId,
                                   VoucherId, UnloadingId, ScalingId, GradingId, SampleTicketId, DateDeposited, GRN_Status, WRStatus, GrossWeight,
                                   NetWeight, OriginalQuantity, CurrentQuantity,
                                   DepositTypeId, Source, NetWeightAdjusted, CreatedBy, CreatedTimestamp, ClientId, NoBags, ProductionYear, GRNType, WeightBeforeMoisture, HalfBagWeight, NetWeightWithHalfBagWeight);
        }
Exemplo n.º 3
0
        public void EditWHRtoWarehouse(string GRNNo, string Shed)
        {
            WarehouseBaseModel con = new WarehouseBaseModel();

            SQLHelper.execNonQuery(con.CDConnectionString, "EditWHRtoWarehouse", GRNNo, Shed);
        }