public void LoadGrid() { string fdate = "", tdate = ""; DateTime df = gl.ToDate(); tdate = df.ToString("MM/dd/yyyy"); //tdate = "08/22/2013"; fdate = tdate; ds.Dispose(); ds.Reset(); string strquery = "select id,Order_No,ErrorCategory1,ErrorField1,Incorrect1,Correct1,Error_Comments1,Review_OP_Comments,Audit_AcceptReason from record_status where pdate between '" + fdate + "' and '" + tdate + "' and Error1='Error'"; ds = con.ExecuteQuery(strquery); if (ds.Tables[0].Rows.Count > 0) { GridErrorDetails.DataSource = ds; GridErrorDetails.DataBind(); } }
public void LoadGrid() { string fdate = "", tdate = ""; DateTime df = gl.ToDate(); tdate = df.ToString("MM/dd/yyyy"); fdate = tdate; ds.Dispose(); ds.Reset(); string strquery = "select id,QC_OP,Review_OP,Order_No,Error,ErrorField,Incorrect,Correct,Error_Comments,QC_OP_Comments,Error1,ErrorField1,Incorrect1,Correct1,Error_Comments1,Review_OP_Comments from record_status where DATE_FORMAT(DATE_SUB(UploadTime,INTERVAL '07:00' HOUR_MINUTE),'%m/%d/%Y') between '" + fdate + "' and '" + tdate + "' and ((K1_OP='" + SessionHandler.UserName + "' and Error='Error') or (QC_OP='" + SessionHandler.UserName + "' and Error1='Error'))"; ds = con.ExecuteQuery(strquery); if (ds.Tables[0].Rows.Count > 0) { DataView dView = gl.ConvertDStoDataview(ds); GridErrorDetails.DataSource = dView; GridErrorDetails.DataBind(); } }