Answer Posted / santro
/*DrugNames DalCls.cs*/
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
using System.IO;
using MedWare;
/// <summary>
/// Summary description for DrugNamesDalCls
/// </summary>
public class DrugNamesDalCls
{
MySqlConnection mysqlcon = new MySqlConnection
(System.Configuration.ConfigurationManager.AppSettings
["strDrugs"].ToString());
public DrugNamesDalCls()
{
//
// TODO: Add constructor logic here
//
}
public void ErrorMsg(string strError)
{
string strErrorPath =
HttpContext.Current.Server.MapPath("Errordetails.txt");
using (FileStream fs = File.Open(strErrorPath,
FileMode.Append, FileAccess.Write))
{
using (StreamWriter sw = new StreamWriter(fs))
{
sw.WriteLine
("..........................................................
............................");
//sw.WriteLine("ApplicationName:" +
strAppUrl);
sw.WriteLine("Error:" + strError);
sw.WriteLine("Creation Date:" +
DateTime.Now);
sw.WriteLine
("..........................................................
............................");
}
}
}
//FUNCTION FOR INSERT TRANSACTION.
public int InsertDrugName(string pstrDrugName)
{
int irec = 0;
string strDate=DateTime.Now.ToString();
//string strIns = "INSERT INTO DRUGNAME VALUES('" +
pstrDrugName + "')";
string strIns = "INSERT INTO DRUGNAME (DrugName)
values('" + pstrDrugName + "')";
try
{
irec = new DrugNamesDblCls().InsDelUpdate
(strIns);
}
catch (Exception ex)
{
ErrorMsg(ex.Message);
}
return irec;
}
//FUNCTION FOR UPDATE TRANSACTION.
public int UpdateDrugName(string strDrugName, string
DrugNameID)
{
int irec = 0;
string strUpdate = "UPDATE drugname SET DRUGNAME='"
+ strDrugName + "' WHERE DRUGNAMEID=" + DrugNameID;
try
{
irec = new DrugNamesDblCls().InsDelUpdate
(strUpdate);
}
catch (Exception ex)
{
ErrorMsg(ex.Message);
}
return irec;
}
// FUNCTION FOR DELETE TRANSACTION.
public int DeleteDrugName(string strDrugNameID)
{
int irec = 0;
string strDel = "DELETE FROM drugname WHERE
drugname='" + strDrugNameID + "'";
try
{
irec = new DrugNamesDblCls().InsDelUpdate
(strDel);
}
catch (Exception ex)
{
ErrorMsg(ex.Message);
}
return irec;
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what is the due dates of depositing the PF challan & Esic challan.
what inventory and depreciation methods are used in by most tax accountants?
I'm having trouble with the meaning of three words: Lie, Deceive, Mislead. They seem to mean something a bit similar, but not exactly the same. Help me to sort them out from each other.
Sir, My client A is doing job work on piece rate basis for B a establishment in Baddi in Himachal Pradesh and .His labour are working in Baddi Himschal Pradesh. and the payment was made to A after confirmation from the Quality confirmation department of the establishments and calculated on piece rate basis. Here B is exempted from excise duty from Excise. A has done work up to Feb, 2016t , 2009 nearly Rs15 - 20 lacs in total up to date . he is not charge any Service Tax. Pls advice in this case service tax is exempted if job work is done in excise exempt unit. Pls confirm in this case service Tax is exempted or not. If not exempted the then what amount b has to pay service tax.
Name the president of constituent assembly ?
If my friend locks me in a room, and says I am free to come out whenever I like as long as I pay £5, is this a deprivation of liberty?
What is a Queen's Counsel and how does one become one?
Why is Roman law relevant to our modem study of law?
i worked in TCS for 2 months and then i joined another company. now TCS sent me a mail to give RS 65,661 as per the bond that too within 15 days. what should i do? help me
whether societies comes under corporate or non corporate company?
I am a merchant exporter,I want purchase products of steel items from the registered dealer. what is the procedure for it ? and what procedure for the Excise rebate claims?
Can any one please explain me a comparison between internal check, internal audit, internal control? (Auditing)
Purchase material & lease the same. In this cases vat & service tax which is appicable?
Hi i am a canadian my wife has PR card but wife can't speak english properly.i am thinking to go us for visit with my wife.my qus.is can i go to embassy with her when she got the interview date? Thank you.
I WANT BUY FLAT IN VASAI WHICH IS BANK AUCTION PROPERTY OF RS.18L. MU AGENT TOLD ME WE WILL BUY FROM DEBT RECOVERY TRIBUNAL AND THEY GIVE TITAL CLEAR OR ANY CLEARANCE CERTIFICATE SO WHAT IS RIGHT PROCESS AND ITS TRUE?