public bool Post(IssuerEntity issuerEntity) { ManageSQLConnection manageSQLConnection = new ManageSQLConnection(); List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >(); sqlParameters.Add(new KeyValuePair <string, string>("@IssuerNo", issuerEntity.IssuerNo)); sqlParameters.Add(new KeyValuePair <string, string>("@Issuername", issuerEntity.IssuerName)); sqlParameters.Add(new KeyValuePair <string, string>("@SocietyCode", issuerEntity.SocietyCode)); sqlParameters.Add(new KeyValuePair <string, string>("@IssuerCode", issuerEntity.IssuerCode)); sqlParameters.Add(new KeyValuePair <string, string>("@CategoryId", issuerEntity.CategoryId)); sqlParameters.Add(new KeyValuePair <string, string>("@Tycode", issuerEntity.Tycode)); sqlParameters.Add(new KeyValuePair <string, string>("@Beneficiaries", issuerEntity.NoOfBeneficiaries)); sqlParameters.Add(new KeyValuePair <string, string>("@Activeflag", issuerEntity.Activeflag)); sqlParameters.Add(new KeyValuePair <string, string>("@ACSCode", issuerEntity.ACSCode)); sqlParameters.Add(new KeyValuePair <string, string>("@GCode", issuerEntity.GCode)); sqlParameters.Add(new KeyValuePair <string, string>("@RCode", issuerEntity.RCode)); sqlParameters.Add(new KeyValuePair <string, string>("@GSTNo", issuerEntity.GSTNumber)); return(manageSQLConnection.InsertData("InsertIssuerMaster", sqlParameters)); }
public bool Put(IssuerEntity issuerEntity) { if (issuerEntity.Type == 1) { ManageSQLConnection manageSQLConnection = new ManageSQLConnection(); List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >(); sqlParameters.Add(new KeyValuePair <string, string>("@IssuerCode", issuerEntity.IssuerCode)); sqlParameters.Add(new KeyValuePair <string, string>("@PartyID", issuerEntity.PartyID)); sqlParameters.Add(new KeyValuePair <string, string>("@IssuerNo", issuerEntity.IssuerNo)); sqlParameters.Add(new KeyValuePair <string, string>("@GSTNumber", issuerEntity.GSTNumber)); sqlParameters.Add(new KeyValuePair <string, string>("@RCode", issuerEntity.RCode)); return(manageSQLConnection.UpdateValues("UpdateIssuerPartyMaster", sqlParameters)); } else { ManageSQLConnection manageSQLConnection = new ManageSQLConnection(); List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >(); sqlParameters.Add(new KeyValuePair <string, string>("@IssuerCode", issuerEntity.IssuerCode)); sqlParameters.Add(new KeyValuePair <string, string>("@Activeflag", issuerEntity.Activeflag)); sqlParameters.Add(new KeyValuePair <string, string>("@ACSCode", issuerEntity.ACSCode)); sqlParameters.Add(new KeyValuePair <string, string>("@Godcode", issuerEntity.GCode)); return(manageSQLConnection.UpdateValues("UpdateIssuerMaster", sqlParameters)); } }