//public bool ExecuteSP(string SP_Name, SqlParameter[] param, ref SqlDataReader dr)
    //{
    //    bool flag;

    //    try
    //    {
    //        GetConnection();
    //        dr = SqlHelper.ExecuteReader(GlobalVar.mCon, SP_Name, param);
    //        if (dr.HasRows) flag = true; else flag = false;
    //    }
    //    catch (Exception ex) { throw ex; }
    //    return flag;


    //}

    public DataSet FillDataSet(string SP_Name, SqlParameter[] param)
    {
        DataSet ds = new DataSet();

        ds = SqlHelper.ExecuteDataset(CConnection.GetConnectionString(), CommandType.StoredProcedure, SP_Name, param);
        return(ds);
    }
 public DataTable GetDatas(string SQL, string database)
 {
     try
     {
         //StrCCon = CConnection.GetDMISConnectionString();
         //if (database == "DMIS")
         //{
         //    StrCCon = CConnection.GetDMISConnectionString();
         //}
         if (database == "FAMSConnectionString")
         {
             StrCCon = General.GetFAMConString();
         }
         else
         {
             StrCCon = CConnection.GetConnectionString();
         }
         SqlDataAdapter dta = new SqlDataAdapter(SQL, StrCCon);
         DataTable      dt  = new DataTable();
         dta.Fill(dt);
         StrCCon = CConnection.GetConnectionString();
         return(dt);
     }
     catch (Exception e)
     {
         // msg = e.Message;
         //GlobalVar.mErrorMessage = " Cretical connection Error cant continue ,please contact with concern person \n" + e.Message;
         return(null);
     }
 }
Exemple #3
0
 public SysFunction()
 {
     //
     // TODO: Add constructor logic here
     //
     StrCCon = CConnection.GetConnectionString();
 }
 public bool CodeExists(string strTableNames, string strColumnCode, string strColumeValue, string strDealerCode, ref DataSet ds)
 {
     try
     {
         //Create query to check in all tables one by one
         //foreach ( sTableName in strTableNames) {
         string sQuery = "SELECT * FROM " + strTableNames + " WHERE " + strColumnCode + " = '" + strColumeValue + "' AND DealerCode = '" + strDealerCode + "'";
         StrCCon = CConnection.GetConnectionString();
         ds      = new DataSet();
         ds      = SqlHelper.ExecuteDataset(this.StrCCon, CommandType.Text, sQuery);
         if (ds.Tables[0].Rows.Count > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         //clsLogger.WriteLog(e.Message, e.Source);
         throw ex;
     }
 }
Exemple #5
0
        public static DataSet GetData(SqlCommand cmd, int pageIndex)
        {
            string strConnString = CConnection.GetConnectionString();

            using (SqlConnection con = new SqlConnection(strConnString))
            {
                using (SqlDataAdapter sda = new SqlDataAdapter())
                {
                    cmd.Connection    = con;
                    sda.SelectCommand = cmd;
                    using (DataSet ds = new DataSet())
                    {
                        sda.Fill(ds, "JobCardMaster");
                        DataTable dt = new DataTable("Pager");
                        dt.Columns.Add("PageIndex");
                        dt.Columns.Add("PageSize");
                        dt.Columns.Add("RecordCount");
                        dt.Rows.Add();
                        dt.Rows[0]["PageIndex"]   = pageIndex;
                        dt.Rows[0]["PageSize"]    = PageSize;
                        dt.Rows[0]["RecordCount"] = cmd.Parameters["@RecordCount"].Value;
                        ds.Tables.Add(dt);
                        return(ds);
                    }
                }
            }
        }
Exemple #6
0
        public static string GetSaleInvoiceDetail(string TransNo, string ChasisNo, string DealerCode)
        {
            string json = "";
            List <SelectListItem> item = new List <SelectListItem>();

            var Serializer = new JavaScriptSerializer();
            List <VehicleSaleMasterVM> lst = new List <VehicleSaleMasterVM>();

            try
            {
                //var Serializer = new JavaScriptSerializer();
                SqlParameter[] sqlParam =
                {
                    new SqlParameter("@DealerCode", DealerCode),
                    new SqlParameter("@TransCode",  TransNo),
                    new SqlParameter("@ChasisNo",   ChasisNo)
                };
                dt = DataAccess.getDataTable("SP_Get_SaleInvoiceDetail", sqlParam, CConnection.GetConnectionString());

                if (dt.Rows.Count > 0)
                {
                    lst = EnumerableExtension.ToList <VehicleSaleMasterVM>(dt);
                }
                json = Serializer.Serialize(lst);
            }
            catch (Exception ex)
            {
                //throw;
            }
            return(json);
        }
Exemple #7
0
        //string CCon = ConfigurationManager.AppSettings["ConnectionString"].ToString();
        protected void Page_Load(object sender, EventArgs e)
        {
            CrystalReportViewer1.DisplayGroupTree = false;
            RD       = new ReportDocument();
            ReportID = Request.QueryString["ReportID"];
            if (ReportID == "PartItemLedger")
            {
                string StrToDateFrom = "", StrDateTo = "";
                RD    = new ReportDocument();
                dsrpt = new DataSet1();
                // PartItemLedger.sp_ItemStockLedger_select.Load(ds.CreateDataReader());
                DataSet ds = new DataSet();
                //DataSet ds1 = new DataSet();
                StrToDateFrom = Request.QueryString["FromDate"];
                StrDateTo     = Request.QueryString["ToDate"];
                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode",   SqlDbType.Char, 5),           //0
                    new SqlParameter("@FromPartCode", SqlDbType.VarChar, 50),       //0
                    new SqlParameter("@ToPartCode",   SqlDbType.VarChar, 50),       //0
                    new SqlParameter("@OpeningDate",  SqlDbType.VarChar, 10),       //0
                    new SqlParameter("@ToDate",       SqlDbType.VarChar, 10),       //0
                };
                param[0].Value = Session["DealerCode"].ToString();
                param[1].Value = Request.QueryString["FromCode"].ToString();
                param[2].Value = Request.QueryString["ToCode"].ToString();
                param[3].Value = Convert.ToDateTime(StrToDateFrom).ToString("yyyy-MM-dd");
                param[4].Value = Convert.ToDateTime(StrDateTo).ToString("yyyy-MM-dd");
                ObjSysFunc.ExecuteSP_NonQuery("sp_PartItemLedger", param);
                ds = SqlHelper.ExecuteDataset(CConnection.GetConnectionString(), CommandType.Text, "sp_tempItemStockLedger_Select '" + Session["DealerCode"].ToString() + "'");
                //dsrpt.sp_tempItemStockLedger_Select.Load(ds.CreateDataReader());

                RD.Load(base.Server.MapPath("rptItemStockLedger.rpt"));
                //RD.Load(base.Server.MapPath("rptLedger.rpt"));
                RD.DataDefinition.FormulaFields["DealerName"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
                RD.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";
                RD.DataDefinition.FormulaFields["DealerPhone"].Text   = "'" + Session["DealerPhone"].ToString() + "'";
                RD.DataDefinition.FormulaFields["DealerEmail"].Text   = "'" + Session["DealerEmail"].ToString() + "'";
                RD.DataDefinition.FormulaFields["UserID"].Text        = "'" + Session["UserName"].ToString() + "'";
                RD.DataDefinition.FormulaFields["FromCode"].Text      = "\"" + Convert.ToDateTime(Request.QueryString["FromDate"].ToString()).ToString("dd/MM/yyyy") + "\"";
                RD.DataDefinition.FormulaFields["ToCode"].Text        = "\"" + Convert.ToDateTime(Request.QueryString["ToDate"].ToString()).ToString("dd/MM/yyyy") + "\"";
                RD.DataDefinition.FormulaFields["NTN"].Text           = "'N.T.N # " + Session["DealerNTN"].ToString() + "'";
                RD.DataDefinition.FormulaFields["SalesTaxNo"].Text    = "'Sales Tax No.  " + Session["DealerSaleTaxNo"].ToString() + " '";
                RD.DataDefinition.FormulaFields["Terminal"].Text      = "'" + Request.ServerVariables["REMOTE_ADDR"].ToString() + "'";
                RD.DataDefinition.FormulaFields["ReportTitle"].Text   = "\"" + "ITEM STOCK LEDGER REPORT" + "\"";
                RD.DataDefinition.FormulaFields["Pic"].Text           = "'C:\\Users\\u_ahm\\OneDrive\\Documents\\Visual Studio 2010\\Projects\\WebApplication1\\WebApplication1\\" + Session["Logo"] + "'";
                //  RD.SetDataSource(dsrpt.sp_tempItemStockLedger_Select.DataSet);
            }
            CrystalReportViewer1.ReportSource = RD;
        }
    public bool ExecuteQuery_NonQuery(string strQuery)
    {
        bool flag;

        try
        {
            StrCCon = CConnection.GetConnectionString();
            SqlHelper.ExecuteNonQuery(StrCCon, CommandType.Text, strQuery);
            flag = true;
        }
        catch (Exception exception)
        {
            flag = false;
            throw exception;
        }

        return(flag);
    }
    public bool ExecuteSP_NonQuery(string SP_Name, SqlParameter[] param)
    {
        bool flag;

        try
        {
            //GetConnection().toString;
            StrCCon = CConnection.GetConnectionString();

            SqlHelper.ExecuteNonQuery(StrCCon, CommandType.StoredProcedure, SP_Name, param);
            flag = true;
        }
        catch (Exception exception)
        {
            flag = false;
            throw exception;
        }
        return(flag);
    }
Exemple #10
0
    public bool ExecuteSP(string SP_Name, SqlParameter[] param, ref SqlDataReader dr)
    {
        bool flag;

        try
        {
            StrCCon = CConnection.GetConnectionString();

            dr = SqlHelper.ExecuteReader(StrCCon, SP_Name, param);
            if (dr.HasRows)
            {
                flag = true;
            }
            else
            {
                flag = false;
            }
        }
        catch (Exception ex) { throw ex; }
        return(flag);
    }
Exemple #11
0
    /* new methods starts general methods  */

    public DataTable GetData(string SQL)
    {
        try
        {
            if (StrCCon == String.Empty)
            {
                StrCCon = CConnection.GetConnectionString();
            }

            SqlDataAdapter dta = new SqlDataAdapter(SQL, StrCCon);
            DataTable      dt  = new DataTable();
            dta.Fill(dt);

            return(dt);
        }
        catch (Exception e)
        {
            //GlobalVar.mErrorMessage = " Cretical connection Error cant continue ,please contact with concern person \n" + e.Message;
            return(null);
        }
    }
Exemple #12
0
    public bool ExecuteQuery(string sQuery, ref SqlDataReader dr)
    {
        bool flag;

        try
        {
            StrCCon = CConnection.GetConnectionString();
            dr      = SqlHelper.ExecuteReader(StrCCon, CommandType.Text, sQuery);

            if (dr.HasRows)
            {
                flag = true;
            }
            else
            {
                flag = false;
            }
        }
        catch (Exception exception) { throw exception; }
        return(flag);
    }
Exemple #13
0
        public static bool Insert_Service(ServiceVM model)
        {
            try
            {
                if (string.IsNullOrEmpty(model.VehExpCode))
                {
                    //strAutoCode = sysfun.GetNewMaxID("UCS_Buying", "BuyingCode", 8, dealerCode);
                    strAutoCode = sysfun.GetNewMaxID("VehExpHead", "VehExpCode", 5, model.DealerCode);
                }
                else
                {
                    strAutoCode = model.VehExpCode;
                }


                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode", "COMON"),              //0
                    new SqlParameter("@VehExpCode", strAutoCode),          //1
                    new SqlParameter("@VehExpDesc", model.VehExpDesc),     //2
                    new SqlParameter("@DefaultValue", model.DefaultValue), //2
                    new SqlParameter("@AccountCode", model.AccountCode),   //2
                    new SqlParameter("@UpdUser", AuthBase.UserId),         //3
                    new SqlParameter("@UpdTerm", General.CurrentIP)        //4
                };
                dt = DataAccess.getDataTable("Sp_Insert_Service", param, CConnection.GetConnectionString());
                if (dt.Rows.Count > 0)
                {
                }
                IsSaved = true;
            }
            catch (Exception)
            {
                throw;
            }

            return(IsSaved);
        }
Exemple #14
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            if (txtGatePassCode.Text == "")
            {
                sysfun.UserMsg(lblMessage, Color.Green, "Please Select GatePass ");
                return;
            }
            if (!sec.UserRight("2590", "004"))
            {
                Response.Redirect("~/Test.aspx");
            }
            string CCon = CConnection.GetConnectionString();

            SqlDataAdapter dta = new SqlDataAdapter("Select Post from GatePassTemp where  CompCode='" + Session["DealerCode"].ToString() + "' and GatePassCode='" + txtGatePassCode.Text + "' and DelFlag<>'Y'  ", CCon);

            DataTable dt = new DataTable();

            dta.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                string Postflag = dt.Rows[0]["Post"].ToString();

                if (Postflag == "Y")
                {
                    sysfun.UserMsg(lblMessage, Color.Red, "GatePass Can't Be Edit or Delete. . .! It is Already Posted. ");

                    return;
                }
            }

            string sql = "Update GatePassTemp set DelFlag='Y' where GatePassCode='" + txtGatePassCode.Text + "'";

            if (sysfun.ExecuteQuery_NonQuery(sql))
            {
                sysfun.UserMsg(lblMessage, Color.Green, "GatePass Deleted");
            }
        }
Exemple #15
0
        protected void BtnPrint_Click(object sender, EventArgs e)
        {
            if (!sec.UserRight("2550", "006"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (ddlSRNO.SelectedIndex == 0)
            {
                SysFunc.UserMsg(LbErr, Color.Red, "Select Sales Return number first ");
                return;
            }
            else
            {
                LbErr.Text = "";
            }
            ReportDocument RD;

            Data.DSReports dsRpt1 = new Data.DSReports();

            RD = new ReportDocument();
            DataSet ds = new DataSet();

            ds = SqlHelper.ExecuteDataset(CConnection.GetConnectionString(), CommandType.Text, "sp_SaleReturn_Report '" + Session["DealerCode"].ToString() + "', '" + ddlSRNO.SelectedValue.ToString().Trim() + "'");
            dsRpt1.sp_SaleReturn_Report.Load(ds.CreateDataReader());
            RD.Load(Server.MapPath("../SpareReports/rptSaleReturnReport.rpt"));

            RD.DataDefinition.FormulaFields["DealerName"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerPhone"].Text   = "'" + Session["DealerPhone"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerEmail"].Text   = "'" + Session["DealerEmail"].ToString() + "'";
            RD.DataDefinition.FormulaFields["UserID"].Text        = "'" + Session["UserName"].ToString() + "'";
            //RD.DataDefinition.FormulaFields["FromCode"].Text = "\"" + Convert.ToDateTime(FromDate).ToString("dd/MM/yyyy") + "\"";
            //RD.DataDefinition.FormulaFields["ToCode"].Text = "\"" + Convert.ToDateTime(ToDate).ToString("dd/MM/yyyy") + "\"";
            RD.DataDefinition.FormulaFields["NTN"].Text         = "'N.T.N # " + Session["DealerNTN"].ToString() + "'";
            RD.DataDefinition.FormulaFields["SalesTaxNo"].Text  = "'Sales Tax No.  " + Session["DealerSaleTaxNo"].ToString() + " '";
            RD.DataDefinition.FormulaFields["Terminal"].Text    = "'" + Request.ServerVariables["REMOTE_ADDR"].ToString() + "'";
            RD.DataDefinition.FormulaFields["ReportTitle"].Text = "\"" + "SALES RETURN" + "\"";
            RD.DataDefinition.FormulaFields["CompanyName"].Text = "'" + Session["DealerDesc"].ToString() + "'";
            //RD.DataDefinition.FormulaFields["Pic"].Text = "'C:\\Users\\u_ahm\\OneDrive\\Documents\\Visual Studio 2010\\Projects\\WebApplication1\\WebApplication1\\" + Session["Logo"] + "'";
            RD.DataDefinition.FormulaFields["Pic"].Text = "'" + Server.MapPath("~") + Session["Logo"] + "'";
            //RD.DataDefinition.FormulaFields["DealershipName"].Text = "'Authorised " + Session["ParentDesc"].ToString() + " Dealership'";
            //RD.SetDataSource(dsrpt.sp_tempItemStockLedger_Select.DataSet);
            RD.SetDataSource(dsRpt1);
            string FilePath = Server.MapPath("~") + "\\Download\\";
            string FileName = "Report.pdf";
            string File     = FilePath + FileName;

            PdfDocument outputDocument = new PdfDocument();
            Stream      stream         = RD.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            stream.Seek(0, SeekOrigin.Begin);
            DirectoryInfo info = new DirectoryInfo(FilePath);

            if (!info.Exists)
            {
                info.Create();
            }

            string path = Path.Combine(FilePath, FileName);

            using (FileStream outputFileStream = new FileStream(path, FileMode.Create))
            {
                stream.CopyTo(outputFileStream);
            }
            stream.Dispose(); stream.Close();
            RD.Dispose(); RD.Close();
            string URL = "../../../Download/PrintReport.aspx";

            string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);

            //CrystalReportViewer1.ReportSource = RD;


            //Session["RDSpare"] = RD;
            //RD.Database.Tables[0].SetDataSource(objDsReports);


            // crReportDocument = new ReportDocument();
            //  crReportDocument = RD; // (ReportDocument)Session["RDSpare"];
            //string FilePath = Server.MapPath("~") + "\\Download\\";
            //string FileName = "SalesReturn" + this.Session["DealerCode"].ToString() + DateTime.Now.ToString("ddMMyyyy") + ".pdf";
            //string File = FilePath + FileName;

            //Session["RD"] = RD;

            //string URL;
            //URL = "../../../../Download/rptViewerService.aspx?FileName=" + FileName;

            ////URL = FilePath + "OpenPdf.aspx?FileName=" + FileName;
            ////txtPartItemDesc.Text = URL;
            //string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            //ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
        }
Exemple #16
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (ddlGType.SelectedValue == "0")
                {
                    sysfun.UserMsg(lblMessage, Color.Red, "Please Select GatePass Type First!", txtRegNo);
                }
                if (ddlModule.SelectedValue == "0")
                {
                    sysfun.UserMsg(lblMessage, Color.Red, "Please Select Trans Type First!", txtRegNo);
                }

                if (txtGatePassCode.Text == "")
                {
                    if (!sec.UserRight("2590", "002"))
                    {
                        Response.Redirect("~/Test.aspx");
                    }
                    Autostr = myFunc.AutoGen("GatePassTemp", "GatePassCode", DateTime.Parse(DateTime.Now.ToShortDateString()).ToString("dd/MM/yyyy"));
                }
                else
                {
                    if (!sec.UserRight("2590", "003"))
                    {
                        Response.Redirect("~/Test.aspx");
                    }
                    Autostr = txtGatePassCode.Text;
                    string CCon = CConnection.GetConnectionString();

                    SqlDataAdapter dta = new SqlDataAdapter("Select Post from GatePassTemp where  CompCode='" + Session["DealerCode"].ToString() + "' and GatePassCode='" + txtGatePassCode.Text + "' and DelFlag<>'Y'  ", CCon);

                    DataTable dt = new DataTable();
                    dta.Fill(dt);
                    if (dt.Rows.Count > 0)
                    {
                        string Postflag = dt.Rows[0]["Post"].ToString();

                        if (Postflag == "Y")
                        {
                            sysfun.UserMsg(lblMessage, Color.Red, "GatePass Can't Be Edit or Delete. . .! It is Already Posted. ");

                            return;
                        }
                    }
                }

                SqlParameter[] GatePass_param =
                {
                    /*0*/ new SqlParameter("@DealerCode",   SqlDbType.Char,        5),

                    /*1*/ new SqlParameter("@GatePassCode", SqlDbType.Char,        8),
                    /*2*/ new SqlParameter("@GatePassDate", SqlDbType.DateTime),
                    /*4*/ new SqlParameter("@TransCode",    SqlDbType.VarChar,     8),
                    /*3*/ new SqlParameter("@GatePassType", SqlDbType.Char,        1),
                    /*4*/ new SqlParameter("@Remarks",      SqlDbType.Char,      100),
                    /*6*/ new SqlParameter("@Module",       SqlDbType.VarChar,    50),
                    /*7*/ new SqlParameter("@UpdUser",      SqlDbType.Char,       50),
                    /*8*/ new SqlParameter("@UpdTerm",      SqlDbType.Char,       50),
                    /*9*/ new SqlParameter("@DelFlag",      SqlDbType.Char,        1),
                    /*10*/ new SqlParameter("@InvoiceNo",   SqlDbType.VarChar,     8),
                    /*11*/ new SqlParameter("@InDate",      SqlDbType.DateTime),
                    /*12*/ new SqlParameter("@InTime",      SqlDbType.DateTime),
                    /*13*/ new SqlParameter("@OutDate",     SqlDbType.DateTime),
                    /*14*/ new SqlParameter("@OutTime",     SqlDbType.DateTime),
                };

                GatePass_param[0].Value  = Session["DealerCode"].ToString();
                GatePass_param[1].Value  = Autostr;
                GatePass_param[2].Value  = sysfun.SaveDate(txtGatePassDate.Text);
                GatePass_param[3].Value  = "";
                GatePass_param[4].Value  = ddlGType.SelectedValue;
                GatePass_param[5].Value  = txtRemarks.Text;
                GatePass_param[6].Value  = ddlModule.SelectedValue;
                GatePass_param[7].Value  = Session["UserName"].ToString();
                GatePass_param[8].Value  = GlobalVar.mUserIPAddress;
                GatePass_param[9].Value  = "N";
                GatePass_param[10].Value = "";
                GatePass_param[11].Value = sysfun.SaveDate(txtInDate.Text);
                GatePass_param[12].Value = Convert.ToDateTime(txtInTime.Text).ToString("HH:mm");
                GatePass_param[13].Value = sysfun.SaveDate(txtOutDate.Text);
                GatePass_param[14].Value = Convert.ToDateTime(txtOutTime.Text).ToString("HH:mm");;

                if (ObjTrans.BeginTransaction(ref Trans) == true)
                {
                    if (txtGatePassCode.Text == "")
                    {
                        if (myFunc.ExecuteSP_NonQuery("[Sp_Insert_GatePassTemp_GPForm]", GatePass_param, Trans))
                        {
                            bool a = (rowsInVehicle(gvVehicle) == true ? Inser_JobCardDetail() : false);
                        }
                    }
                    else
                    {
                        if (myFunc.ExecuteSP_NonQuery("[Sp_Insert_GatePassTemp_GPForm]", GatePass_param, Trans))
                        {
                            bool a = (rowsInVehicle(gvVehicle) == true ? Inser_JobCardDetail() : false);
                        }
                    }
                }
                if (ObjTrans.CommittTransaction(ref Trans) == true)
                {
                    lblMessage.ForeColor = Color.Green;
                    if (txtGatePassCode.Text.Trim() == "") //ddlJobCardCode.SelectedIndex
                    {
                        lblMessage.Text = "Record Saved Successfully: " + Autostr;
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "Savealert()", true);
                    }
                    else
                    {
                        lblMessage.Text = "Record Updated Successfully: " + Autostr;
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "Updatealert()", true);
                    }
                }
                else
                {
                    ObjTrans.RollBackTransaction(ref Trans);
                    sysfun.UserMsg(lblMessage, Color.Red, "Record not saved Try again. Or contact to support team ");
                }
                ClearGatePassTextBoxes();
            }
            catch (Exception ex)
            {
                sysfun.UserMsg(lblMessage, Color.Red, ex.Message, txtGatePassCode);
            }
        }
Exemple #17
0
        protected void btnPrint_Click(object sender, EventArgs e)
        {
            if (!sec.UserRight("2590", "006"))
            {
                Response.Redirect("~/Test.aspx");
            }
            ReportDocument rpt, crReportDocument, RD;
            PdfDocument    outputDocument = new PdfDocument();
            string         strCriteria, rptTitle;
            DateTime       FromDate, ToDate;
            SqlDataReader  rder;
            SysFunctions   myFunc = new SysFunctions();

            Data.DSReports DSReports = new Data.DSReports();


            RD = new ReportDocument();
            string CCon = CConnection.GetConnectionString();
            // PartItemLedger.sp_ItemStockLedger_select.Load(ds.CreateDataReader());
            DataSet ds = new DataSet();

            //if (txtTransCode.Text.Trim() != "")
            //{
            //    ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_GatePassMaster_Print '" + this.Session["DealerCode"].ToString() + "','" + txtGatePassCode.Text + "'");
            //}
            //else
            //{
            //    ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_W2_GatePass_VehicleDetail_Select '" + this.Session["DealerCode"].ToString() + "','" + txtGatePassCode.Text + "'");
            //}


            // QRCodeEncoder encoder = new QRCodeEncoder();

            // Bitmap bi = encoder.Encode(ds.Tables[0].Rows[0]["DealerCode"].ToString() + "" + ds.Tables[0].Rows[0]["JobCardCode"].ToString());

            // bi.SetPixel(10, 10, Color.Red);

            //  bi.Save(Server.MapPath("~/Images/QrCode.jpg"), System.Drawing.Imaging.ImageFormat.Jpeg);
            ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "_sp_GatePassTempForm '" + this.Session["DealerCode"].ToString() + "','" + txtGatePassCode.Text + "'");
            DSReports.EnforceConstraints = false;
            DSReports._sp_GatePassTempForm.Load(ds.CreateDataReader());



            string FileRptPath = Server.MapPath("~/Modules/Service/ServiceReports/");


            RD.Load(Server.MapPath("~/Modules/Service/ServiceReports/rptGatePassForm.rpt"));



            RD.DataDefinition.FormulaFields["DealerName"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerPhone"].Text   = "'" + Session["DealerPhone"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerEmail"].Text   = "'" + Session["DealerEmail"].ToString() + "'";
            RD.DataDefinition.FormulaFields["ReportTitle"].Text   = "'Gate Pass'";
            RD.DataDefinition.FormulaFields["Terminal"].Text      = "'" + Request.ServerVariables["REMOTE_ADDR"].ToString() + "'";
            RD.DataDefinition.FormulaFields["UserId"].Text        = "'" + Session["UserName"].ToString() + "'";
            RD.DataDefinition.FormulaFields["NTN"].Text           = "'N.T.N # " + Session["DealerNTN"].ToString() + "'";
            RD.DataDefinition.FormulaFields["SalesTaxNo"].Text    = "'Sales Tax No.  " + Session["DealerSaleTaxNo"].ToString() + " '";
            //rpt.DataDefinition.FormulaFields["UserCell"].Text = "'" + GetStringValuesAgainstCodes("CusCode", , "CellNo", "Customer") + "'";
            RD.DataDefinition.FormulaFields["CompanyName"].Text = "'" + Session["DealerDesc"].ToString() + "'";
            //RD.DataDefinition.FormulaFields["Pic"].Text = "'C:\\Users\\u_ahm\\OneDrive\\Documents\\Visual Studio 2010\\Projects\\WebApplication1\\WebApplication1\\" + Session["Logo"] + "'";
            RD.DataDefinition.FormulaFields["Pic"].Text = "'" + Server.MapPath("~") + Session["Logo"] + "'";

            RD.DataDefinition.FormulaFields["QRCode"].Text = "'" + Server.MapPath("~") + "/Images/QrCode.jpg'";

            //DataTable dt = new DataTable();

            //string sql = "Select Logo from Dealer where DealerCode = '" + Session["DealerCode"].ToString() + "'";

            //dt = myFunc.GetData(sql);

            //RD.DataDefinition.FormulaFields["Logo"].Text = "'"+dt.Rows[0]["Logo"].ToString()+"'";
            //RD.DataDefinition.FormulaFields["DealershipName"].Text = "'Authorised " + Session["ParentDesc"].ToString() + " Dealership'";


            // CrystalReportViewer1.ReportSource = rpt;
            RD.SetDataSource(DSReports.sp_JobCardMaster_Print.DataSet);
            string FilePath = Server.MapPath("~") + "\\Download\\";
            string FileName = "Report.pdf";
            string File     = FilePath + FileName;


            Stream stream = RD.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            stream.Seek(0, SeekOrigin.Begin);
            DirectoryInfo info = new DirectoryInfo(FilePath);

            if (!info.Exists)
            {
                info.Create();
            }

            string path = Path.Combine(FilePath, FileName);

            using (FileStream outputFileStream = new FileStream(path, FileMode.Create))
            {
                stream.CopyTo(outputFileStream);
            }
            stream.Dispose(); stream.Close();
            string URL = "../../../Download/PrintReport.aspx";

            string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/Main/login.aspx");
            }
            rpt = new ReportDocument();
            String StrReportID, Type;

            Type        = Request.QueryString["Type"];
            StrReportID = Request.QueryString["ReportID"];
            if (StrReportID == "PaymentReceiptReport")
            {
                rpt.Load(Server.MapPath("rptPaymentReceiptPrint.rpt"));

                strCriteria = "{PaymentReceiptMaster.ReceiptNo}='" + Request.QueryString["ReceiptNo"] + "' " +
                              "AND {PaymentReceiptMaster.DealerCode}='" + Session["DealerCode"].ToString() + "' " +
                              "AND {PaymentReceiptMaster.DelFlag} = 'N' ";

                //rpt.RecordSelectionFormula = strCriteria;

                rpt.DataDefinition.FormulaFields["DealerDesc"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";

                rpt.DataDefinition.FormulaFields["ReportTitle"].Text = "'Payment Receipt'";
                rpt.DataDefinition.FormulaFields["Terminal"].Text    = "'" + Environment.MachineName + "'";
                rpt.DataDefinition.FormulaFields["UserId"].Text      = "'" + Session["UserName"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["SalesTaxNo"].Text  = "'" + Session["DealerSaleTaxNo"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["NTN"].Text         = "'" + Session["DealerNTN"].ToString() + "'";
                //rpt.DataDefinition.FormulaFields["UserCell"].Text = "'" + grl.GetStringValuesAgainstCodes("CusCode", SessionInformation.LoginID, "CellNo", "Customer") + "'";


                // CrystalReportViewer1.ReportSource = rpt;
            }
            if (StrReportID == "CustomerEstimate")
            {
                //ReportDocument RD;
                //string strCriteria, rptTitle;
                //DateTime FromDate, ToDate;
                //SqlDataReader rder;
                //CustEstimateCode

                SysFunctions   myFunc = new SysFunctions();
                Data.DSReports DsRpt  = new Data.DSReports();
                //DataSet1 dsRpt1 = new DataSet1();
                SqlDataReader rder = null;
                rpt = new ReportDocument();
                string         CCon  = CConnection.GetConnectionString();
                DataSet        ds    = new DataSet();
                SqlParameter[] param =
                {
                    new SqlParameter("@DealerCode", SqlDbType.Char),           //0
                    new SqlParameter("@CustomerEstimateCode", SqlDbType.Char), //1
                };
                param[0].Value           = Session["DealerCode"].ToString();
                param[1].Value           = Request.QueryString["CustEstimateCode"].ToString();
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateMaster_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateMaster_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateDetail_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateDetail_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateDetailSup_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateDetailSup_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateLubricates_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateLubricates_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateLubricatesSup_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateLubricatesSup_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimateParts_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimateParts_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                ds = SqlHelper.ExecuteDataset(CCon, CommandType.Text, "sp_CustomerEstimatePartsSup_Print '" + this.Session["DealerCode"].ToString() + "','" + Request.QueryString["CustEstimateCode"].ToString() + "'");
                DsRpt.sp_CustomerEstimatePartsSup_Print.Load(ds.CreateDataReader());
                DsRpt.EnforceConstraints = false;
                myFunc.ExecuteSP("sp_CustomerEstimateBoutParts_Print", param, ref rder);
                DsRpt.sp_CustomerEstimateBoutParts_Print.Load(rder);
                DsRpt.EnforceConstraints = false;
                myFunc.ExecuteSP("sp_EstimateSubletDetail_Print", param, ref rder);
                DsRpt.sp_JobCardSubletDetail_Print.Load(rder);

                rpt.Load(Server.MapPath("~/Modules/Service/ServiceReports/rptCustomerEstimatePrint.rpt"));

                rpt.DataDefinition.FormulaFields["DealerName"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["DealerPhone"].Text   = "'" + Session["DealerPhone"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["DealerEmail"].Text   = "'" + Session["DealerEmail"].ToString() + "'";
                if (Type == "Insurance")
                {
                    rpt.DataDefinition.FormulaFields["ReportTitle"].Text = "'Insurance Estimate'";
                }
                else
                {
                    rpt.DataDefinition.FormulaFields["ReportTitle"].Text = "'Customer Estimate'";
                }

                rpt.DataDefinition.FormulaFields["Terminal"].Text   = "'" + Request.ServerVariables["REMOTE_ADDR"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["UserId"].Text     = "'" + Session["UserName"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["NTN"].Text        = "'N.T.N # " + Session["DealerNTN"].ToString() + "'";
                rpt.DataDefinition.FormulaFields["SalesTaxNo"].Text = "'Sales Tax No.  " + Session["DealerSaleTaxNo"].ToString() + " '";
                //rpt.DataDefinition.FormulaFields["UserCell"].Text = "'" + GetStringValuesAgainstCodes("CusCode", , "CellNo", "Customer") + "'";
                rpt.DataDefinition.FormulaFields["Pic"].Text = "'" + Server.MapPath("~") + Session["Logo"] + "'";
                rpt.Database.Tables[0].SetDataSource(DsRpt);
                //CrystalReportViewer1.ReportSource = rpt;
                //  rpt.SetDataSource(DsRpt.sp_CustomerEstimateMaster_Print.DataSet);

                Session["RDService"] = rpt;
            }
            else
            {
                rpt = (ReportDocument)Session["RD"];
            }

            //var connectionInfo = new ConnectionInfo();
            //connectionInfo.ServerName = "localhost";
            //connectionInfo.DatabaseName = "BMS";
            //connectionInfo.Password = "******";
            //connectionInfo.UserID = "sa";
            //connectionInfo.Type = ConnectionInfoType.SQL;
            //connectionInfo.IntegratedSecurity = false;

            //for (int i = 0; i < CrystalReportViewer1.LogOnInfo.Count; i++)
            //{
            //    CrystalReportViewer1.LogOnInfo[i].ConnectionInfo = connectionInfo;
            //}
            //if (Environment.MachineName == "AZHARDELL")
            //{
            //    rpt.SetDatabaseLogon("sa", "100372", "localhost", "BMS");
            //}
            //else
            //{
            //    rpt.SetDatabaseLogon("sa", "tiger", "akramali-pc", "BMS");
            //}
            string FilePath = Server.MapPath("~") + "\\Download\\";
            string FileName = "Report.pdf";
            string File     = FilePath + FileName;

            PdfDocument outputDocument = new PdfDocument();
            Stream      stream         = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            stream.Seek(0, SeekOrigin.Begin);
            DirectoryInfo info = new DirectoryInfo(FilePath);

            if (!info.Exists)
            {
                info.Create();
            }

            string path = Path.Combine(FilePath, FileName);

            using (FileStream outputFileStream = new FileStream(path, FileMode.Create))
            {
                stream.CopyTo(outputFileStream);
            }
            stream.Dispose(); stream.Close();
            rpt.Dispose(); rpt.Close();
            Session["RDService"] = rpt;
            string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"1000px\" height=\"800px\">";

            embed       += "If you are unable to view file, you can download from <a href = \"{0}\">here</a>";
            embed       += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
            embed       += "</object>";
            ltEmbed.Text = string.Format(embed, ResolveUrl("~/Download/Report.pdf"));

            //CrystalReportViewer1.ReportSource = rpt;
            //CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
        }
Exemple #19
0
        //protected void ddlFromCode_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    ddlToCode.SelectedValue = ddlFromCode.SelectedValue;
        //}

        protected void btnPrint_Click(object sender, EventArgs e)
        {
            if (!sec.UserRight("2574", "006"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (txtFromItemCode.Text == "")
            {
                //ObjGenral.UserMsg(lblMsg, Color.Red, "Please Select From Code ");
                //ddlFromCode.Focus();
                return;
            }
            if (txtToItemCode.Text == "")
            {
                //ObjGenral.UserMsg(lblMsg, Color.Red, "Please Select To Code ");
                //ddlToCode.Focus();
                return;
            }

            ReportDocument RD;
            ReportDocument crReportDocument;
            ReportDocument rpt;
            SqlDataReader  rder;
            string         ReportID = "";

            DXBMS.Data.DataSet1 dsrpt;
            SysFunctions        ObjSysFunc = new SysFunctions();


            string FromDate = txtFromDate.Text.Substring(6, 4) + "/" + txtFromDate.Text.Substring(3, 2) + "/" + txtFromDate.Text.Substring(0, 2);
            string ToDate   = txtToDate.Text.Substring(6, 4) + "/" + txtToDate.Text.Substring(3, 2) + "/" + txtToDate.Text.Substring(0, 2);
            string RptName  = "PartItemLedger";


            RD = new ReportDocument();

            string StrToDateFrom = "", StrDateTo = "";

            RD    = new ReportDocument();
            dsrpt = new DXBMS.Data.DataSet1();
            // PartItemLedger.sp_ItemStockLedger_select.Load(ds.CreateDataReader());
            DataSet ds = new DataSet();

            //DataSet ds1 = new DataSet();
            StrToDateFrom = FromDate;
            StrDateTo     = ToDate;
            SqlParameter[] param =
            {
                new SqlParameter("@DealerCode",   SqlDbType.Char, 5),            //0
                new SqlParameter("@FromPartCode", SqlDbType.VarChar, 50),        //0
                new SqlParameter("@ToPartCode",   SqlDbType.VarChar, 50),        //0
                new SqlParameter("@OpeningDate",  SqlDbType.VarChar, 10),        //0
                new SqlParameter("@ToDate",       SqlDbType.VarChar, 10),        //0
            };
            param[0].Value = Session["DealerCode"].ToString();
            param[1].Value = txtFromItemCode.Text;
            param[2].Value = txtToItemCode.Text;
            param[3].Value = Convert.ToDateTime(StrToDateFrom).ToString("yyyy-MM-dd");
            param[4].Value = Convert.ToDateTime(StrDateTo).ToString("yyyy-MM-dd");
            ObjSysFunc.ExecuteSP_NonQuery("sp_PartItemLedger", param);
            ds = SqlHelper.ExecuteDataset(CConnection.GetConnectionString(), CommandType.Text, "sp_tempItemStockLedger_Select '" + Session["DealerCode"].ToString() + "'");
            dsrpt.sp_tempItemStockLedger_Select.Load(ds.CreateDataReader());

            //RD.Load(base.Server.MapPath("rptItemStockLedger.rpt"));
            RD.Load(Server.MapPath("~/Modules/SpareParts/SpareReports/rptItemStockLedger.rpt"));

            //RD.Load(Server.MapPath("~/Modules/Reports/rptStockLedgerNew.rpt"));

            // //RD.Load(base.Server.MapPath("rptLedger.rpt"));
            RD.DataDefinition.FormulaFields["DealerName"].Text    = "'" + Session["DealerDesc"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerAddress"].Text = "'" + Session["DealerAddress"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerPhone"].Text   = "'" + Session["DealerPhone"].ToString() + "'";
            RD.DataDefinition.FormulaFields["DealerEmail"].Text   = "'" + Session["DealerEmail"].ToString() + "'";
            RD.DataDefinition.FormulaFields["UserID"].Text        = "'" + Session["UserName"].ToString() + "'";
            RD.DataDefinition.FormulaFields["FromCode"].Text      = "\"" + Convert.ToDateTime(FromDate).ToString("dd/MM/yyyy") + "\"";
            RD.DataDefinition.FormulaFields["ToCode"].Text        = "\"" + Convert.ToDateTime(ToDate).ToString("dd/MM/yyyy") + "\"";
            RD.DataDefinition.FormulaFields["NTN"].Text           = "'N.T.N # " + Session["DealerNTN"].ToString() + "'";
            RD.DataDefinition.FormulaFields["SalesTaxNo"].Text    = "'Sales Tax No.  " + Session["DealerSaleTaxNo"].ToString() + " '";
            //RD.DataDefinition.FormulaFields["Terminal"].Text = "'" + Request.ServerVariables["REMOTE_ADDR"].ToString() + "'";
            RD.DataDefinition.FormulaFields["ReportTitle"].Text = "\"" + "ITEM STOCK LEDGER REPORT" + "\"";
            RD.DataDefinition.FormulaFields["CompanyName"].Text = "'" + Session["DealerDesc"].ToString() + "'";
            //RD.DataDefinition.FormulaFields["Pic"].Text = "'C:\\Users\\u_ahm\\OneDrive\\Documents\\Visual Studio 2010\\Projects\\WebApplication1\\WebApplication1\\" + Session["Logo"] + "'";
            RD.DataDefinition.FormulaFields["Pic"].Text = "'" + Server.MapPath("~") + Session["Logo"] + "'";
            //RD.DataDefinition.FormulaFields["DealershipName"].Text = "'Authorised " + Session["ParentDesc"].ToString() + " Dealership'";
            //RD.SetDataSource(dsrpt.sp_tempItemStockLedger_Select.DataSet);
            RD.SetDataSource(dsrpt);

            string FilePath = Server.MapPath("~") + "\\Download\\";
            string FileName = "Report.pdf";
            string File     = FilePath + FileName;

            PdfDocument outputDocument = new PdfDocument();
            Stream      stream         = RD.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

            stream.Seek(0, SeekOrigin.Begin);
            DirectoryInfo info = new DirectoryInfo(FilePath);

            if (!info.Exists)
            {
                info.Create();
            }

            string path = Path.Combine(FilePath, FileName);

            using (FileStream outputFileStream = new FileStream(path, FileMode.Create))
            {
                stream.CopyTo(outputFileStream);
            }
            stream.Dispose(); stream.Close();
            string URL = "../../../../Download/PrintReport.aspx";

            string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
            //string FilePath = Server.MapPath("~") + "\\Download\\";
            //string FileName = "PartItemLedger" + this.Session["DealerCode"].ToString() + DateTime.Now.ToString("ddMMyyyy") + ".pdf";
            //string File = FilePath + FileName;
            ////crReportDocument.SetDatabaseLogon("SDMS", "sdms161", "192.168.1.47", "SDMS");

            //// ConnectionInfo conninfo = new ConnectionInfo();
            //Session["RD"] = RD;
            ////RD.ExportToDisk(ExportFormatType.PortableDocFormat, File);
            ////crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, File);

            //string URL;
            //URL = "../../../../Download/rptViewerService.aspx?FileName=" + FileName;


            //string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            //ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
        }