public int CheckUser(string loginName) { InventoryClass obj = new InventoryClass(); int x = 0; dbobj.ExecuteScalar("select count(*) from user_master where loginname='" + loginName + "'", ref x); return(x); }
public string GetCustID(PaymentReceiptModel payment) { int OldCustID = 0; if (payment.PanReceiptNo == true) { dbobj.ExecuteScalar("select cust_id from customer where cust_name=(select ledger_name from ledger_master where ledger_id = '" + payment.CustomerID + "')", ref OldCustID); var customerID = OldCustID.ToString(); } /****************Add by vikas 12.09.09 ********************************/ else { dbobj.ExecuteScalar("select cust_id from customer where cust_name=(select ledger_name from ledger_master where ledger_name= '" + payment.CustomerID + "')", ref OldCustID); var customerID = OldCustID.ToString(); } return(OldCustID.ToString()); }