public bool Update(EntityHandler.ChoseBank obj) { bool Status = false; try { string SqlCommand = ""; Status = new DALBase().Update(SqlCommand); } catch (Exception ex) { } return Status; }
public bool Delete(EntityHandler.VoucherType obj) { bool Status = false; try { string SqlCommand = ""; Status = new DALBase().Update(SqlCommand); } catch (Exception ex) { } return Status; }
public DataTable SelectAll(EntityHandler.VoucherType obj) { DataTable dt = new DataTable(); try { string SqlCommand = ""; dt = new DALBase().Select(SqlCommand); } catch (Exception ex) { } return dt; }
public DataTable DALGetCustomerMaster() { DataTable dt = new DataTable(); try { string SqlCommand = "SELECT * FROM [tblCustomerMaster]"; dt = new DALBase().Select(SqlCommand); dt.TableName = "tblCustomerMaster"; } catch (Exception ex) { } return dt; }
public bool Insert(EntityHandler.Objects obj) { bool Status = false; try { string SqlCommand = ""; Status = new DALBase().Insert(SqlCommand); } catch (Exception ex) { } return Status; }
public DataTable DALGetMaxVoucherID() { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_MAXVoucherID"; oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPFinance(oSqlCommand); dt.TableName = "tblVoucher"; } catch (Exception ex) { } return dt; }
public DataTable SelectAll() { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_SelectBankALL"; oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPFinance(oSqlCommand); dt.TableName = "Bank"; } catch (Exception ex) { } return dt; }
public DataTable DALGetFinalCreditorSupplierList() { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_PaymentCreditorFinalSupllierList"; oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPMRP(oSqlCommand); dt.TableName = "tblSupplier"; } catch (Exception ex) { } return dt; }
public DataTable DALGetGRNMaterial(Bill objBill) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "GetOutstandingBill"; oSqlCommand.Parameters.AddWithValue("@SupplierID", objBill.SupplierID); oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPMRP(oSqlCommand); dt.TableName = "tblpendingpayablebill"; } catch (Exception ex) { } return dt; }
public DataTable DALGetFinalCreditor(LINKPayment objPayment) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_PaymentCreditorFinal"; oSqlCommand.Parameters.AddWithValue("@SupName", objPayment.SupName); oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPMRP(oSqlCommand); dt.TableName = "tblSupplier"; } catch (Exception ex) { } return dt; }
public DataTable SelectAll(EntityHandler.Bank objBank) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_SelectBankAccALL"; oSqlCommand.CommandText = SqlQuery; oSqlCommand.Parameters.AddWithValue("@code",objBank.Code); dt = new DALBase().SelectSPFinance(oSqlCommand); dt.TableName = "tblBankAccount"; } catch (Exception ex) { } return dt; }
public DataTable DALGetLastPayment(LINKPayment objPayment) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_GetLastPayment"; oSqlCommand.Parameters.AddWithValue("@SupplierID", objPayment.SupplierID); oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPFinance(oSqlCommand); dt.TableName = "tblInvoice"; } catch (Exception ex) { } return dt; }
public bool DALInsertVoucherFromInvoive(LINKPayment objPayment) { bool status = false; try { SqlConnection conn = DALConnManager.OpenFinance(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_PaymentInserIntoVoucherFromInvoice"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@VoucherID", objPayment.VoucherID); oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { //StreamWriter file2 = new StreamWriter(@"c:\file.txt", true); //file2.WriteLine(ex.ToString() + "- " + DateTime.Now + "- DAL"); //file2.Close(); } return status; }
public bool DALUpdateMaterial(LINKPayment objPayment) { bool result = false; try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_UpdateStatusGRNMateril"; oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status); oSqlCommand.Parameters.AddWithValue("@GRNNO", objPayment.GRNNo); oSqlCommand.Parameters.AddWithValue("@MaterialCode", objPayment.MaterialCode); oSqlCommand.CommandText = SqlQuery; result = new DALBase().UpdateMRP(oSqlCommand); } catch (Exception ex) { StreamWriter file2 = new StreamWriter(@"c:\file.txt", true); file2.WriteLine(ex.ToString() + "- " + DateTime.Now + "- meeeeeeeeeeeee"); file2.Close(); } return result; }
public DataTable DALGetGRNMaterial(LINKPayment objPayment) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_GRNMaterials"; oSqlCommand.Parameters.AddWithValue("@GRNNO", objPayment.GRNNo); oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status); oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPMRP(oSqlCommand); dt.TableName = "tblGRNMaterials"; } catch (Exception ex) { } return dt; }
public bool DALInsertInvoice(LINKPayment objPayment) { bool status = false; try { SqlConnection conn = DALConnManager.OpenFinance(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_PaymentInserIntoInvoice"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID); oSqlCommand.Parameters.AddWithValue("@ID", objPayment.ID); oSqlCommand.Parameters.AddWithValue("@InvoiceDate", objPayment.InvoiceDate); oSqlCommand.Parameters.AddWithValue("@Value", objPayment.Value); oSqlCommand.Parameters.AddWithValue("@CreateDate", objPayment.CreateDate); oSqlCommand.Parameters.AddWithValue("@CreateUser", objPayment.CreateUser); oSqlCommand.Parameters.AddWithValue("@Modifieddate", objPayment.Modifieddate); oSqlCommand.Parameters.AddWithValue("@ModifiedUser", objPayment.ModifiedUser); oSqlCommand.Parameters.AddWithValue("@Status", objPayment.Status); oSqlCommand.Parameters.AddWithValue("@SupplierID", objPayment.SupplierID); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { } return status; }
public bool DALInsertInvoiceFromGRN(LINKPayment objPayment) { bool status = false; try { SqlConnection conn = DALConnManager.OpenFinance(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_PaymentInserIntoInvoiceFromGRN"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@InvoiceID", objPayment.InvoiceID); oSqlCommand.Parameters.AddWithValue("@GRNNo", objPayment.GRNNo); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { } return status; }
public bool DALVoucherIDStatus(LINKPayment objPayment) { bool status = false; int GRNstatus = 9; try { SqlConnection conn = DALConnManager.OpenFinance(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_UpdateStatustblVoucher"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@Status", GRNstatus); oSqlCommand.Parameters.AddWithValue("@VoucherID", objPayment.VoucherID); oSqlCommand.Parameters.AddWithValue("@ApproveDate", objPayment.ApproveDate); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { } return status; }
public DataTable DALGetInvoiceALL() { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_SelectInvoiceALL"; oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPFinance(oSqlCommand); dt.TableName = "tblInvoice"; } catch (Exception ex) { } return dt; }
//Update MRP Database public bool DALGRNStatus(LINKPayment objPayment) { bool status = false; int GRNstatus = 9; try { SqlConnection conn = DALConnManager.OpenMRP(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_UpdateStatusGRN"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@Status", GRNstatus); oSqlCommand.Parameters.AddWithValue("@GRNNo", objPayment.GRNNo); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { } return status; }