public DsMaster.TEMPBCODEPRINTDataTable CreateBarCodeTable(string purno) { var dt = new DsMaster().TEMPBCODEPRINT; var dm = new PurInvDataManager(); Purinvdetail = dm.GetPurInvDetailsById(purno); foreach (DataRow dr in Purinvdetail.Rows) { var dnew = dt.NewRow(); dnew["ITEMCODE"] = dr["itemno"]; dnew["ITEMNAME"] = new BlItemMaster().GetItemname(dr["itemno"].ToString()); var _qty = int.Parse(dr["qty"].ToString()) + (string.IsNullOrEmpty(dr["BONUSQTY"].ToString()) ? 0 : int.Parse(dr["BONUSQTY"].ToString())); dnew["QTY"] = _qty; dnew["PRICE"] = dr["SPRICE"]; dt.Rows.Add(dnew); } return dt; }
public void GetPurinv() { var dm = new PurInvDataManager(); var ds = ClsGetData.GetPurchaseInvByid(Purinvid); foreach (DataRow d in ds.Rows) { Supid = d["SUPID"].ToString(); Invno = d["INVNO"].ToString(); Invdate = DateTime.Parse(d["INVDATE"].ToString()); Duedays = int.Parse(d["DUEDAYS"].ToString()); Spdiscount =decimal.Parse(d["SPDISCOUNT"].ToString()); Adjvalue = decimal.Parse(d["ADJVALUE"].ToString()); Netvalue = decimal.Parse(d["NETVALUE"].ToString()); Whid = d["WHID"].ToString(); Hold = bool.Parse(d["HOLD"].ToString()); } Purinvdetail = dm.GetPurInvDetailsById(Purinvid); //Purinvdetail = ds1.PURINVDETAIL; }