示例#1
0
        public string Post(QuantityAccountEntity quantityAccountEntity)
        {
            // DataSet ds = new DataSet();
            ManageQuantityAccountReceiptandIssues manageQuantityAccount = new ManageQuantityAccountReceiptandIssues();
            var result = manageQuantityAccount.ProcessQAStatement(quantityAccountEntity);

            return(JsonConvert.SerializeObject(result));
        }
        public string Post(QuantityAccountEntity accountEntity)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", accountEntity.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", accountEntity.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GCode", accountEntity.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", accountEntity.RCode));
            ds = manageSQLConnection.GetDataSetValues("GetTruckMemoForQuantityAC", sqlParameters);
            //Generate the report.
            ManageReport manageReport = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                ManageQAReceipt manageQAReceipt = new ManageQAReceipt();
                Task.Run(() => manageQAReceipt.GenerateQAReceipt(ds, accountEntity, GlobalVariable.QATruckMemoForAllScheme, "- Truck Memo Abstract -", 2));
                return(JsonConvert.SerializeObject(ds.Tables[0]));
            }
            return(JsonConvert.SerializeObject(string.Empty));
        }