public string PutData(DateTime dteProductionDate, string strRowMet, double decRowMet, string strRemarkRow, List <NewProduct> records) { try { insertIntoProductionTableAdapter adp = new insertIntoProductionTableAdapter(); sprInsertStockRegisterTableAdapter adp2 = new sprInsertStockRegisterTableAdapter(); adp.InsertIntoProduction(dteProductionDate, strRowMet, decRowMet, strRemarkRow, "OUT"); adp2.PutBalanceData(4, 50, "Production", dteProductionDate, strRowMet, Convert.ToInt32(decRowMet), strRemarkRow); foreach (var x in records) { adp.InsertIntoProduction(dteProductionDate, x.strDetails, x.intQuantity, x.strRemark, "IN"); adp2.PutBalanceData(3, 50, "Production", dteProductionDate, x.strDetails, x.intQuantity, x.strRemark); } return("Bill is created successfully."); } catch (Exception e) { return("error"); } }
public string PutData(List <ChallanOut> records, int intChallanNo, string strPartyName, string strAddress, DateTime dteDate, string strLCNo, DateTime dteLCDate) { try { tblChallanOutTableAdapter adp = new tblChallanOutTableAdapter(); sprInsertStockRegisterTableAdapter adp2 = new sprInsertStockRegisterTableAdapter(); foreach (var x in records) { adp.PutData(intChallanNo, strPartyName, strAddress, dteDate, x.strDetails, x.intQuantity, x.strRemarks, x.strPurchNo, x.dtePurchDate, strLCNo, dteLCDate); adp2.PutBalanceData(2, intChallanNo, strPartyName, dteDate, x.strDetails, x.intQuantity, x.strRemarks); } return("Challan is created Successfully."); } catch (Exception e) { return("error"); } }
public string PutData(List <ChallanIn> records, int intChallanID, string strPartyName, string strAddress, DateTime dteDate) { try { tblChallanInPutDataTableAdapter adp = new tblChallanInPutDataTableAdapter(); sprInsertStockRegisterTableAdapter adp2 = new sprInsertStockRegisterTableAdapter(); foreach (var x in records) { adp.PutData(intChallanID, strPartyName, strAddress, dteDate, x.strDetails, x.intQuantity, x.strRemarks); adp2.PutBalanceData(1, intChallanID, strPartyName, dteDate, x.strDetails, x.intQuantity, x.strRemarks); } return("Challan is stocked in Successfully."); } catch (Exception e) { return("error"); } }