protected void btnSave_Click(object sender, EventArgs e)
 {
     LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
     if (!(type == "update"))
     {
        
         Assets.InsertAsset(MySessionManager.ClientID,
                            MySessionManager.AppID,
                            Convert.ToInt32(ddlAssetType.Text),
                            txtDescription.Value.Trim(),
                            Convert.ToInt32(txtvalue.Value.Trim()),
                            MySessionManager.CurrentUser.UserID);
     }
     else if(type=="update")
     {
         Assets.UpdateAsset(Convert.ToInt32(ddlAssetType.Text),
                            txtDescription.Value.Trim(),
                            MySessionManager.AppID,
                            MySessionManager.ClientID,
                            Convert.ToInt32(txtvalue.Value.Trim()),
                            1,
                            MySessionManager.CurrentUser.UserID,
                            id);
    }
    
     Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "asedit"));
 }
Example #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
        if (!(type == "update"))
        {
            Assets.InsertAsset(MySessionManager.ClientID,
                               MySessionManager.AppID,
                               Convert.ToInt32(ddlAssetType.Text),
                               txtDescription.Value.Trim(),
                               Convert.ToInt32(txtvalue.Value.Trim()),
                               MySessionManager.CurrentUser.UserID);
        }
        else if (type == "update")
        {
            Assets.UpdateAsset(Convert.ToInt32(ddlAssetType.Text),
                               txtDescription.Value.Trim(),
                               MySessionManager.AppID,
                               MySessionManager.ClientID,
                               Convert.ToInt32(txtvalue.Value.Trim()),
                               1,
                               MySessionManager.CurrentUser.UserID,
                               id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "asedit"));
    }
    public void loadAsset(int id)
    {
        LoanDSTableAdapters.AssetsTableAdapter assets = new LoanDSTableAdapters.AssetsTableAdapter();
        LoanDS.AssetsDataTable tblAssets = assets.GetAssetDetails(id);

           if(tblAssets.Rows.Count>0)
           {
              txtDescription .Value = tblAssets[0].datDescription .ToString();
              txtvalue .Value =tblAssets[0].datValue.ToString();
              ddlAssetType.SelectedIndex= ddlAssetType.Items.IndexOf(ddlAssetType.Items.FindByValue(tblAssets[0].datAssetTypeID.ToString()));
              this.editskip.Value  = "2";
           }
        }
Example #4
0
    public void loadAsset(int id)
    {
        LoanDSTableAdapters.AssetsTableAdapter assets = new LoanDSTableAdapters.AssetsTableAdapter();
        LoanDS.AssetsDataTable tblAssets = assets.GetAssetDetails(id);

        if (tblAssets.Rows.Count > 0)
        {
            txtDescription.Value       = tblAssets[0].datDescription.ToString();
            txtvalue.Value             = tblAssets[0].datValue.ToString();
            ddlAssetType.SelectedIndex = ddlAssetType.Items.IndexOf(ddlAssetType.Items.FindByValue(tblAssets[0].datAssetTypeID.ToString()));
            this.editskip.Value        = "2";
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
        if (!(type == "update"))
        {
            adminTableAdapters.GetFeePaymentTableAdapter feepayment = new adminTableAdapters.GetFeePaymentTableAdapter();
            feepayment.InsertFeePayment(txtvalue.Value.Trim());
        }
        else if (type == "update")
        {
            adminTableAdapters.GetFeePaymentTableAdapter feepayment = new adminTableAdapters.GetFeePaymentTableAdapter();
            feepayment.UpdateFeePayment(txtvalue.Value.Trim(),
                                        id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "asedit"));
    }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
     if (!(type == "update"))
     {
         adminTableAdapters.GetFeePaymentTableAdapter feepayment = new adminTableAdapters.GetFeePaymentTableAdapter();
         feepayment.InsertFeePayment(txtvalue.Value.Trim());
     }
     else if(type=="update")
     {
          adminTableAdapters.GetFeePaymentTableAdapter feepayment = new adminTableAdapters.GetFeePaymentTableAdapter();
         feepayment.UpdateFeePayment(txtvalue.Value.Trim(),
                                     id);
    }
    
     Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "asedit"));
 }
Example #7
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
        if (!(type == "update"))
        {
            adminTableAdapters.GetOptCollateralTableAdapter colType = new adminTableAdapters.GetOptCollateralTableAdapter();
            colType.InsertOptCollateral(txtvalue.Value.Trim());
        }
        else if (type == "update")
        {
            adminTableAdapters.GetOptCollateralTableAdapter colType = new adminTableAdapters.GetOptCollateralTableAdapter();
            colType.UpdateCollaterall(txtvalue.Value.Trim(),
                                      id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "optcoledit"));
    }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     LoanDSTableAdapters.AssetsTableAdapter Assets = new LoanDSTableAdapters.AssetsTableAdapter();
     if (!(type == "update"))
     {
         adminTableAdapters.GetOptCollateralTableAdapter colType = new adminTableAdapters.GetOptCollateralTableAdapter();
         colType.InsertOptCollateral(txtvalue.Value.Trim());
         
     }
     else if(type=="update")
     {
            adminTableAdapters.GetOptCollateralTableAdapter colType = new adminTableAdapters.GetOptCollateralTableAdapter();
            colType.UpdateCollaterall(txtvalue.Value.Trim(),
                                       id);
    }
    
     Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "optcoledit"));
 }