public DataSet InsertUpdateItem(dhDBnames objDBNames, dhItems ObjItem) { DataSet ds; ds = objDALGeneral.InsertUpdateItem(objDBNames, ObjItem); return(ds); }
public dhItems GetdhItem(dhDBnames objDBNames, dhItems ObjItem) { dsGeneral ds = new dsGeneral(); DataSet dsreturn = objDatabase.GetDataSet(objDBNames, ObjItem, "xmlGetItems", (DataSet)ds, "dtPosItems"); dhItems returnObject = null; dsGeneral.dtPosItemsDataTable retdt = ((dsGeneral)dsreturn).dtPosItems; foreach (DataRow row in retdt.Rows) { returnObject = new dhItems { IItemID = Convert.ToInt32(row["IItemID"]), FUnitePrice = Convert.ToDouble(row["FUnitePrice"]), VItemName = Convert.ToString(row["VItemName"]), FMaxDiscountPresent = Convert.ToDouble(row["fMaxDiscountPresent"]), FUnitPurchasePrice = Convert.ToDouble(row["fUnitPurchasePrice"]), IQuantity = 1, Ammount = Convert.ToDouble(row["FUnitePrice"]) * 1, IStockIn = Convert.ToInt32(String.IsNullOrEmpty(row["IStockIn"].ToString()) ? 0 : row["IStockIn"]), IStockOut = Convert.ToInt32(String.IsNullOrEmpty(row["IStockOut"].ToString()) ? 0 : row["IStockOut"]), ICurrantStock = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]), IsAvailable = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0? true : false, StockStatus = Convert.ToInt32(String.IsNullOrEmpty(row["ICurrantStock"].ToString()) ? 0 : row["ICurrantStock"]) > 0 ? "Available" : "Not Available", BIsEditAbleInInvoice = Convert.ToBoolean(row["BIsEditAbleInInvoice"].ToString()), }; } return(returnObject); }
private void InsertRecord() { dhItems objInsert = new dhItems(); objInsert = (dhItems)this.ItemGrid_.DataContext; DataSet ds = iFacedeLayer.iFacede.InsertUpdateItem(Globalized.ObjDbName, objInsert); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["iItemID"].ToString() != "-1") { if (objInsert.IUpdate == 1) { Globalized.SetMsg("I02", DataHolders.MsgType.Info); } else { Globalized.SetMsg("I01", DataHolders.MsgType.Info); objInsert.IUpdate = 1; } AddItemViewModel ObjSetToEdit = new AddItemViewModel(objInsert); Globalized.LoadThisObject(ObjSetToEdit, "Edit Item '" + objInsert.VItemName + "'", Globalized.AppModuleList.Where(xx => xx.VModuleName == "Store").FirstOrDefault().VShortDescription); } else{ Globalized.SetMsg("I013", MsgType.Error); Globalized.ShowMsg(lblErrorMsg); } } }
private void ItemBarCode_PreviewKeyUp(object sender, KeyEventArgs e) { try { if (e.Key == Key.Enter) { dhItems ObjDhInputItem = new dhItems(); if (ItemBarCode.Text.Length > 1) { // ObjDhInputItem.VItemBarcode = ItemBarCode.Text; // EmptyInvoice objabc = (EmptyInvoice)this._tabItems[0].Content as EmptyInvoice; // objabc.AddItem(ObjDhInputItem); // AddItem(ObjDhInputItem); // ItemBarCode.Text = ""; // ItemBarCode.Focus(); // Keyboard.Focus(ItemBarCode); LiftNumber.Text = ""; LiftNumber.Focus(); } } } catch (Exception ex) { // Globalized.setException(ex, lblErrorMsg, MsgType.Error); } }
public dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems ObjItem) { dsGeneral ds = new dsGeneral(); DataSet dsreturn = objDatabase.GetDataSet(objDBNames, ObjItem, "xmlGetItems", (DataSet)ds, "dtPosItems"); dsGeneral.dtPosItemsDataTable retdt = ((dsGeneral)dsreturn).dtPosItems; return(retdt); //dsGeneral.dtPosItemsDataTable dt = objDALGeneral.GetAllItems(objDBNames, ObjItem); //return dt; }
// insert Item public static DataSet InsertUpdateItem(dhDBnames objDBNames, dhItems ObjItem) { try { DataSet var_ret = null; if (objblItems == null) { objblItems = new blItems(); } { var_ret = objblItems.InsertUpdateItem(objDBNames, ObjItem); } return(var_ret); } catch (Exception ex) { throw ex; } }
public static dhItems GetdhItem(dhDBnames objDBNames, dhItems objItem) { try { dhItems var_ret = null; if (objblItems == null) { objblItems = new blItems(); } { var_ret = objblItems.GetdhItem(objDBNames, objItem); } return(var_ret); } catch (Exception ex) { throw ex; } }
public static dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems objItem) { try { dsGeneral.dtPosItemsDataTable var_ret = null; if (objblItems == null) { objblItems = new blItems(); } { var_ret = objblItems.GetItems(objDBNames, objItem); } return(var_ret); } catch (Exception ex) { throw ex; } }
private void Row_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (sender != null) { DataGridRow dgr = sender as DataGridRow; // get the obect and then Invoice ID opne the Id in readonly mode dhItems objTodisplay = new dhItems(); objTodisplay = ((dhItems)dgr.Item); if (objTodisplay != null) { objTodisplay.IUpdate = 1; AddItemViewModel ObjSetToEdit = new AddItemViewModel(objTodisplay); //objvm.SelectToEdit(new AddPartyViewModel(objTodisplay)); Globalized.LoadThisObject(ObjSetToEdit, "Edit Party '" + objTodisplay.VItemName + "'", Globalized.AppModuleList.Where(xx => xx.VModuleName == "Store").FirstOrDefault().VShortDescription); //} } } }
public AddItemView(dhItems Obj) { Globalized.ShowMsg(lblErrorMsg); // GlobalDhItem.VItemName = "asdasd"; //GlobalDhItem = Obj; //InitializeComponent(); //this.DataContext = GlobalDhItem; //btnCancel.Visibility = Visibility.Hidden; //if (Obj.IUpdate == 1) //{ // //lblHeading.Text = "Edit Item"; // ShowStock.Visibility = Visibility.Visible; // // lblInStock.Visibility = Visibility.Hidden; // // vItemBarcodeTextBox_Copy1.Visibility = Visibility.Hidden; //} //if (Globalized.ObjCurrentUser.BCanMakeEditAble != false) //{ // this.bIsEditable.Visibility = Visibility.Visible; //} }
private void ConstructResultSet() { dhItems objitem = new dhItems(); dsGeneral.dtPosItemsDataTable dt = iFacede.GetItems(Globalized.ObjDbName, objitem); _results = new List <dhItems>(); foreach (DataRow row in dt.Rows) { _results.Add(new dhItems { IItemID = Convert.ToInt32(row["IItemID"]), FUnitePrice = Convert.ToDouble(row["FUnitePrice"]), VItemName = Convert.ToString(row["VItemName"]), // FMaxDiscountPresent = Convert.ToDouble(row["fMaxDiscountPresent"]), BIsSaleAble = string.IsNullOrEmpty(row["bIsSaleAble"].ToString()) ? Convert.ToBoolean("False") : Convert.ToBoolean(row["bIsSaleAble"].ToString()), VItemBarcode = row["vItemBarcode"].ToString() //VpartyMobile = Convert.ToString(row["VpartyMobile"]), //VPartyName = Convert.ToString(row["ReadingInches"]), }); } }
private void LiftNumber_PreviewKeyUp(object sender, KeyEventArgs e) { try { if (e.Key == Key.Enter) { dhItems ObjDhInputItem = new dhItems(); if (ItemBarCode.Text.Length > 1) { ObjDhInputItem.VItemBarcode = ItemBarCode.Text; Int32 tabid; int.TryParse(LiftNumber.Text.ToString(), out tabid); if (tabid > tabDynamic.Items.Count) { MessageBox.Show("No Lift is open with this number."); } tabid = tabid > 0 ? tabid - 1 : tabid; EmptyInvoiceView objabc = (EmptyInvoiceView)this._tabItems[tabid].Content as EmptyInvoiceView; // //objabc. objabc.AddItem(ObjDhInputItem); // AddItem(ObjDhInputItem); tabDynamic.SelectedIndex = tabid; ItemBarCode.Text = ""; ItemBarCode.Focus(); Keyboard.Focus(this.ItemBarCode); } } } catch (Exception ex) { // Globalized.setException(ex, lblErrorMsg, MsgType.Error); } }
public dhItems GetdhItem(dhDBnames objDBNames, dhItems ObjItem) { dhItems dh = objDALGeneral.GetdhItem(objDBNames, ObjItem); return(dh); }
public dsGeneral.dtPosItemsDataTable GetItems(dhDBnames objDBNames, dhItems ObjItem) { dsGeneral.dtPosItemsDataTable dt = objDALGeneral.GetItems(objDBNames, ObjItem); return(dt); }
public AddItemViewModel(dhItems objItem) { this.GlobalObj = objItem; }
public DataSet InsertUpdateItem(dhDBnames objDBName, dhItems objItem) { DataSet dsreturn = objDatabase.GetDataSet(objDBName, objItem, "xmlInsertUpdateItem"); return(dsreturn); }