示例#1
0
        public List <DetailPackageOnday> getDetailPackageOnday(int WarehouseId, int Destination)
        {
            List <DetailPackageOnday> lstResult = new List <DetailPackageOnday>();
            DatabaseClass             objData   = new DatabaseClass();
            QueryString objQuery = new QueryString();

            objQuery.strSPName = "getDetailPackageOnday";
            objQuery.AddInt("@WarehouseId", WarehouseId);
            objQuery.AddInt("@Destination", Destination);
            string strSqlStore = objQuery.GenSPString();
            Common common      = new Common();

            try
            {
                var dt = objData.ExeDataset(strSqlStore).Tables[0];
                if (dt != null && dt.Rows.Count > 0)
                {
                    lstResult = objData.ExeDataset(strSqlStore).Tables[0].ToGenericList <DetailPackageOnday>();
                }
            }
            catch (Exception ex)
            {
                common.WriteLog(Environment.CurrentDirectory, "WinAppShipment - getDetailPackageOnday: " + ex.StackTrace);
                lstResult = null;
            }
            finally
            {
                objData.CloseData();
                objData = null;
                common  = null;
            }
            return(lstResult);
        }
示例#2
0
        public bool CreateShipment(string PackageId, tblShipment _tblShipment)
        {
            List <DetailPackageOnday> lstResult = new List <DetailPackageOnday>();
            DatabaseClass             objData   = new DatabaseClass();
            QueryString objQuery = new QueryString();

            objQuery.strSPName = "CreateShipment";
            objQuery.AddString("@ShipmentCode", _tblShipment.ShipmentCode);
            objQuery.AddInt("@Destination", _tblShipment.Destination);
            objQuery.AddInt("@WarehouseId", _tblShipment.WarehouseId);
            objQuery.AddDecimal("@TotalWeight", _tblShipment.TotalWeight);
            objQuery.AddString("@PackageId", PackageId);
            string strSqlStore = objQuery.GenSPString();
            Common common      = new Common();

            try
            {
                objData.ExecuteNonQuery(strSqlStore);

                return(true);
            }
            catch (Exception ex)
            {
                common.WriteLog(Environment.CurrentDirectory, "WinAppShipment - getDetailPackageOnday: " + ex.StackTrace);
                lstResult = null;

                return(false);
            }
            finally
            {
                objData.CloseData();
                objData = null;
                common  = null;
            }
        }
示例#3
0
        public List <ListPackageOnday> GetListPackageOnday()
        {
            List <ListPackageOnday> lstResult = new List <ListPackageOnday>();
            DatabaseClass           objData   = new DatabaseClass();
            QueryString             objQuery  = new QueryString();

            objQuery.strSPName = "getTotalPakageinWarehouseOnday";
            string strSqlStore = objQuery.GenSPString();
            Common common      = new Common();

            try
            {
                lstResult = objData.ExeDataset(objQuery.strSPName).Tables[0].ToGenericList <ListPackageOnday>();
            }
            catch (Exception ex)
            {
                common.WriteLog(Environment.CurrentDirectory, "WinAppShipment - GetListPackageOnday: " + ex.StackTrace);
                lstResult = null;
            }
            finally
            {
                objData.CloseData();
                objData = null;
                common  = null;
            }
            return(lstResult);
        }