protected virtual bool Load(Enumarations.State MinState) { bool bTemp = false; DataSet oDS; oDS = null; if (this.ID > 0) { try { DAL.DataProvider.SqlClientProvider oSqlClientProvider = new DAL.DataProvider.SqlClientProvider(); oDS = oSqlClientProvider.GetOperatorDetailByOPID(this.ID, (int)MinState); if (Utility.CheckDataSetState(oDS) && (Utility.CheckDataTableState(oDS.Tables[0]))) { if (oDS.Tables[0].Rows.Count > 0) { bTemp = LoadOperatorFromDataRow(oDS.Tables[0].Rows[0], MinState); } } } catch (Exception Exp) { } finally { } } return(bTemp); }
private bool LoadCustomerFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["CID"].ToString()); this.Name = oRow["CName"].ToString(); this.Country = oRow["Country"].ToString(); this.City = oRow["City"].ToString(); this.Email = oRow["Email"].ToString(); this.Address = oRow["Address"].ToString(); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.OrderNo = Int32.Parse(oRow["OrderNo"].ToString()); this.CreationUserID = Int32.Parse(oRow["CreatorUID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.CreationIP = oRow["CreatorIP"].ToString(); this.UpdateUserID = Int32.Parse(oRow["UpdaterUID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); this.UpdateIP = oRow["UpdaterIP"].ToString(); bResult = true; } return(bResult); }
private bool LoadOperatorFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["Id"].ToString()); this.ProductId = Int32.Parse(oRow["ProductId"].ToString()); this.ColorId = Int32.Parse(oRow["ColorId"].ToString()); this.Count = Int32.Parse(oRow["Count"].ToString()); bResult = true; } return(bResult); }
private bool LoadUserFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["UID"].ToString()); this.UserType = (Enumarations.UserType)Int32.Parse(oRow["UTID"].ToString()); this.Name = oRow["UName"].ToString(); this.Password = oRow["UPassword"].ToString(); bResult = true; } return(bResult); }
private bool LoadProductFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["PID"].ToString()); Category oCategory = new Category(); oCategory.ID = Int32.Parse(oRow["Category"].ToString()); this.Category = oCategory; this.CategoryID = Int32.Parse(oRow["Category"].ToString()); this.Name = oRow["PName"].ToString(); this.Code = oRow["Code"].ToString(); this.ExtraCode1 = oRow["ExtraCode1"].ToString(); this.ExtraCode2 = oRow["ExtraCode2"].ToString(); this.ExtraCode3 = oRow["ExtraCode3"].ToString(); this.ExtraCode4 = oRow["ExtraCode4"].ToString(); this.NumberOfTurns = Int32.Parse(oRow["NumberOfTurns"].ToString()); this.NumberOfForm = Int32.Parse(oRow["NumberOfForm"].ToString()); this.Diameter = float.Parse(oRow["Diameter"].ToString()); this.WireDiameter = float.Parse(oRow["WireDiameter"].ToString()); this.StraighteningLength = float.Parse(oRow["StraighteningLength"].ToString()); this.Weight = float.Parse(oRow["Weight"].ToString()); this.RawMaterialsCharacteristic = oRow["RawMaterialsCharacteristic"].ToString(); this.Price = decimal.Parse(oRow["Price"].ToString()); this.Picture1 = oRow["Picture1"].ToString(); this.Picture2 = oRow["Picture2"].ToString(); this.Picture3 = oRow["Picture3"].ToString(); this.Picture4 = oRow["Picture4"].ToString(); this.TecniquePicture = oRow["TecniquePicture"].ToString(); this.PDFDocument = oRow["PDFDocument"].ToString(); this.HatveArasi = Int32.Parse(oRow["HatveArasi"].ToString()); this.ToplamBoy = Int32.Parse(oRow["ToplamBoy"].ToString()); this.KancaArasi = Int32.Parse(oRow["KancaArasi"].ToString()); this.Ictenice = Int32.Parse(oRow["Ictenice"].ToString()); this.KancaYonu = oRow["KancaYonu"].ToString(); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.CreationUserID = Int32.Parse(oRow["CreatorID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.UpdateUserID = Int32.Parse(oRow["UpdaterID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); bResult = true; } return(bResult); }
private bool LoadMachineFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["MID"].ToString()); this.Name = oRow["MCode"].ToString(); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.CreationUserID = Int32.Parse(oRow["CreatorID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.UpdateUserID = Int32.Parse(oRow["UpdaterID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); bResult = true; } return(bResult); }
private bool LoadOperatorFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["OPID"].ToString()); this.Name = oRow["OPName"].ToString(); this.LastName = oRow["OPLastName"].ToString(); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.OrderNo = Int32.Parse(oRow["OrderNo"].ToString()); this.CreationUserID = Int32.Parse(oRow["CreatorUID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.CreationIP = oRow["CreatorIP"].ToString(); this.UpdateUserID = Int32.Parse(oRow["UpdaterUID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); this.UpdateIP = oRow["UpdaterIP"].ToString(); bResult = true; } return(bResult); }
private bool LoadRawMaterialsFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["Id"].ToString()); this.WireDiameter = Int32.Parse(oRow["WireDiameter"].ToString()); this.Hardness = Int32.Parse(oRow["Hardness"].ToString()); this.Amount = Int32.Parse(oRow["Amount"].ToString()); this.Compound = oRow["Compound"].ToString(); this.Quality = oRow["Quality"].ToString(); this.SurfaceCondition = oRow["SurfaceCondition"].ToString(); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.CreationUserID = Int32.Parse(oRow["CreatorID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.UpdateUserID = Int32.Parse(oRow["UpdaterID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); bResult = true; } return(bResult); }
private bool LoadOrderFromDataRow(DataRow oRow, Enumarations.State nMinState) { bool bResult = false; if (oRow != null) { this.ID = Int32.Parse(oRow["OID"].ToString()); this.OrderNo = oRow["OrderNo"].ToString(); this.CustomerID = Int32.Parse(oRow["Customer"].ToString()); this.OrderStatus = (Enumarations.OrderStatus)Int32.Parse(oRow["OrderStatus"].ToString()); this.DateOfDelivery = Convert.ToDateTime(oRow["DateOfDelivery"]); this.Products = oRow["Products"].ToString(); this.EstimatedTotalProductionTime = Int32.Parse(oRow["EstimatedTotalProductionTime"].ToString()); this.State = (Enumarations.State)(Int32.Parse(oRow["State"].ToString())); this.TotalCost = decimal.Parse(oRow["TotalCost"].ToString()); this.CreationUserID = Int32.Parse(oRow["CreatorID"].ToString()); this.CreationDate = Convert.ToDateTime(oRow["CreationDate"].ToString()).ToLocalTime(); this.UpdateUserID = Int32.Parse(oRow["UpdaterID"].ToString()); this.UpdateDate = Convert.ToDateTime(oRow["UpdateDate"].ToString()).ToLocalTime(); bResult = true; } return(bResult); }
public Operator(int OPID, Enumarations.State MinState) { this.ID = OPID; IsVerified = this.Load(MinState); }
public Machine(int CID, Enumarations.State MinState) { this.ID = CID; IsVerified = this.Load(MinState); }
public RawMaterials(int Id, Enumarations.State MinState) { this.ID = Id; IsVerified = this.Load(MinState); }
public Product(int PID, Enumarations.State MinState) { this.ID = PID; IsVerified = this.Load(MinState); }
public Order(int OID, Enumarations.State MinState) { this.ID = OID; IsVerified = this.Load(MinState); }
public User(int UID, Enumarations.State MinState) { this.ID = UID; IsVerified = this.Load(MinState); }
public Customer(int CID, Enumarations.State MinState) { this.ID = CID; IsVerified = this.Load(MinState); }