public JsonResult DeleteAccount(int AccountsID) { string _Del = null; try { KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_Accounts objdb = new BL_Accounts(); Accounts objSG = new Models.MasterFinacialAccounts.Accounts(); int DependaincyName = objdb.DeleteAccounts(AccountsID); if (DependaincyName == 1) { _Del = "Account Deleted Successfully"; } else { _Del = "Can not Delete"; } } catch (Exception ex) { throw ex; } return(new JsonResult { Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public DataSet BindProductSupl(string Name) { DataSet ds = new DataSet(); try { if (Name == "") { Name = "%"; } KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select ProductSupplierID , ProductSupplierName , ShortName ,ProductSupplier.Address ,DLNo,FoodLicNo,CreditDay,ProductSupplier.CSTNo, ProductSupplier.TINDate,Accounts.AccountName ,ContactPerson from ProductSupplier left join Accounts On Accounts.AccountsID = ProductSupplier.AccountsID where ProductSupplier.RowStatus = 0 and ProductSupplier.HospitalID = " + HospitalID + " and ProductSupplier.LocationID = " + LocationID + " order by ProductSupplierName asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); } catch (Exception ex) { ExceptionManager.Publish(ex); throw ex; } return(ds); }
public DataSet BindPostingAccount() { DataSet ds = new DataSet(); KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select AccountsID, AccountName, PrintName, Address, MobileNo, PhoneNo, EmailID from Accounts where HospitalID = " + HospitalID + " and LocationID = " + LocationID + " and RowStatus = 0 order by AccountName asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); return(ds); }
public DataSet BindPurchaseTax() { DataSet ds = new DataSet(); KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select TaxTypeInformationID,Code from TaxInformation where TaxTypeInformation= 'Purchase' and RowStatus=0 and HospitalID =" + HospitalID + " and LocationID =" + LocationID + " order by Discription asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); return(ds); }
public DataSet BindBatchNoOfProduct(int ProductID) { DataSet ds = new DataSet(); KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select ProductDetailsID ,BatchNo,ExpiryDate, PurchaseRate,MRP,SalesRate,CurrentStock ,CurrentStock1 from ProductDetails left join Product on Product .ProductID = ProductDetails.ProductID where Product.HospitalID = " + HospitalID + " and Product.LocationID = " + LocationID + " and ProductDetails.ProductID =" + ProductID + " and ProductDetails.RowStatus = 0 order by BatchNo asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); return(ds); }
public DataSet BindProductName(string Name) { DataSet ds = new DataSet(); KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select ProductID,ProductName,ProductGroup.ProductGroupName,Packing,Contain,ProductLowerUnitName,SellLoose,GenericInformation.GenericName ,MfrName,MaxQtyLevel,Scheduled,CategoryID,BarCode,DiscontinueDate,ExtraField,DetailWithExtraField from Product left join ProductGroup on ProductGroup.ProductGroupID = Product.ProductGroupID left join GenericInformation on GenericInformation.GenericID = Product.GenericID where ProductName like '" + Name + "%' and Product.HospitalID =1 and Product.LocationID =1 and Product.RowStatus=0 order by Product.ProductName", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); return(ds); }
public DataSet GetCity(string CityName, string City) { DataSet ds = new DataSet(); try { KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select CityID,CityName from City where CityName like '" + CityName + "%" + "' and CityID like '" + City + "%" + "' and HospitalID = '" + HospitalID + "' and LocationID = '" + LocationID + "' and RowStatus=0 order by CityName asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); } catch (Exception) { } return(ds); }
public DataSet BindPostindAccount(string prefix) { DataSet ds = new DataSet(); try { KeystoneProject.Models.MasterFinacialAccounts.Accounts obj = new Models.MasterFinacialAccounts.Accounts(); Connect(); SqlCommand cmd = new SqlCommand("select AccountsID,AccountName from MedicalAccounts where AccountName like '" + prefix + "%" + "' and RowStatus = 0 and HospitalID = " + HospitalID + " and LocationID = " + LocationID + " order by AccountName asc", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); con.Close(); } catch (Exception ex) { } return(ds); }