protected void btnDatabaseBackup_Click(object sender, EventArgs e)
    {
        try
        {
            string   strPath      = Server.MapPath("Uploads/DBBackup/");
            string   strDBDetails = System.Configuration.ConfigurationManager.AppSettings["db"];
            String[] strArr       = strDBDetails.Split('|');
            string   strname      = strPath + "YSPM" + "_" + DateTime.Now.Year + "_" + DateTime.Now.Month + "_" + DateTime.Now.Day + "_" + DateTime.Now.Hour + "_" + DateTime.Now.Month + "_" + DateTime.Now.Second + ".bak";

            DatabaseManager.tblAttributes objAttr = new DatabaseManager.tblAttributes();
            Common objCommon = new Common();

            String[] temp = { strname, strArr[3] };

            objAttr.resizeArray(temp);
            objAttr.strProc = "BackupDatabase";
            string intMaxId = objCommon.SaveUpdateDeleteWithoutTrans(ref objAttr);

            if (intMaxId == "1")
            {
                lblStatus.Text = " Backup Success";
                ProcessDirectory();
            }
            else
            {
                lblStatus.Text = "Server Error ";
            }
        }
        catch (Exception ex)
        {
            lblStatus.Text = "Server Error " + ex.Message;
        }
        //DBBackup
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Common objcommon = new Common();
            DatabaseManager.tblAttributes objAttr = new DatabaseManager.tblAttributes();

            ProcessDirectory();
        }
    }