当前位置: 首页>>代码示例>>C#>>正文


C# ClsBAL.Logerror方法代码示例

本文整理汇总了C#中BAL.ClsBAL.Logerror方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.Logerror方法的具体用法?C# ClsBAL.Logerror怎么用?C# ClsBAL.Logerror使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.Logerror方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BindApis

    protected void BindApis()
    {
        try
        {
            objBAL = new ClsBAL();
            ObjDataset = (DataSet)objBAL.GetCommissionApis();
            if (ObjDataset != null)
            {
                ViewState["CommissionApis"] = ObjDataset.Tables[0];
                GvCommissions.DataSource = ObjDataset.Tables[0];
                GvCommissions.DataBind();
                if (ObjDataset.Tables[0].Rows.Count > 0)
                {
                    lbtnXport2Xcel.Visible = true;
                }
                else
                {
                    lbtnXport2Xcel.Visible = false;
                }
            }

        }
        catch (Exception ex)
        {
            objBAL.Logerror(this.Page.ToString(), "BindApis", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
            throw ex;
        }
        finally
        {
            if (ObjDataset != null) { ObjDataset = null; }
            if (ObjDataset1 != null) { ObjDataset1 = null; }
            if (ObjDatatable != null) { ObjDatatable = null; }
            if (ObjDataview != null) { ObjDataview = null; }

        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:36,代码来源:Commission.aspx.cs

示例2: GetBusHireDetails

    protected void GetBusHireDetails()
    {
        try
        {
            tdmsg.Visible = false;
            lblMainMsg.Text = "";
            objManabusBAL = new ClsBAL();
            ObjDataset = objManabusBAL.GetBusHireDetails();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables[0].Rows.Count > 0)
                {
                    ViewState["BusHires"] = ObjDataset.Tables[0];
                    lbtnXport2Xcel.Enabled = ddlPageSize.Enabled = true;
                }
                else
                {
                    lbtnXport2Xcel.Enabled = ddlPageSize.Enabled = false;
                }
                GvBusHires.DataSource = ObjDataset.Tables[0];
                GvBusHires.DataBind();
            }
        }
        catch (Exception ex)
        {
            objManabusBAL.Logerror(this.Page.ToString(), "GetBusHireDetails", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
            throw ex;
        }
        finally
        {
            if (ObjDataset != null) { ObjDataset = null; }

        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:34,代码来源:BusHireDetails.aspx.cs

示例3: btnUpdateUD_Click

    protected void btnUpdateUD_Click(object sender, EventArgs e)
    {
        try
        {
            tdmsg.Visible = false;
            lblMainMsg.Text = "";
            objBAL = new ClsBAL();
            objBAL.UpdateAgentByAgent(txtName.Text.Trim(), "", Convert.ToDateTime("1/1/1900"), txtCity.Text.Trim().ToString(),
               ddlState.SelectedItem.Text.ToString(),
               txtAddress.Text.Trim().ToString(),
               txtPinCode.Text.Trim().ToString(),
               txtMobileNo.Text.Trim().ToString(),
                "", "", txtEmailId.Text.Trim().ToString(), "", "", "1",
               txtPassword.Text.Trim().ToString(),
               Convert.ToInt32(lblID.Text),
              0, 0);
            //if (ViewState["Users"] != null)
            //{
            //    ObjDatatable = (DataTable)ViewState["Users"];

            //    ObjDataview = new DataView(ObjDatatable);
            //    ObjDataview.RowFilter = "UserName='" + Convert.ToString(txtUsername.Text) + "'";
            //    if (ObjDataview.Count > 0)
            //    {
            //        tdmsg.Visible = true;
            //        tdmsg.Style.Add("background-color:#E77471;", "");
            //        lblMainMsg.Text = "Username not Available ...";
            //        lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
            //        //GvCommissions.DataSource = ViewState["Roles"];
            //        //GvCommissions.DataBind();
            //    }
            //    else
            //    {
            //        objBAL = new ClsBAL();
            //        objBAL.ID = Convert.ToInt32(lblID.Text);
            //        objBAL.userName = txtUsername.Text;
            //        objBAL.password = txtPassword.Text;
            //        objBAL.name = txtName.Text;
            //        objBAL.roleId = Convert.ToInt32(ddlRole.SelectedValue);
            //        objBAL.modifiedBy = Convert.ToInt32(Session["UserID"]);
            //        if (objBAL.UpdateUser())
            //        {
            tdmsg.Visible = true;
          //  tdmsg.Style.Add("background-color:#6CC417;", "");
            lblMainMsg.Text = "User details updated Successfully....";
            lblMainMsg.ForeColor = System.Drawing.Color.Green;
            BindUsers();
            MVUsers.ActiveViewIndex = 0;
            MVUsers.Visible = true;
            //        }
            //        else
            //        {
            //            tdmsg.Visible = true;
            //            tdmsg.Style.Add("background-color:#E77471;", "");
            //            lblMainMsg.Text = "OOPS...Failed to update user setails....";
            //            lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
            //            MVUsers.Visible = true;
            //        }
            //    }
            // }

        }
        catch (Exception ex)
        {
            objBAL.Logerror(this.Page.ToString(), "btnUpdateUD_Click", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:68,代码来源:Users.aspx.cs

示例4: btnSaveUD_Click

    protected void btnSaveUD_Click(object sender, EventArgs e)
    {
        try
        {
            tdmsg.Visible = false;
            lblMainMsg.Text = "";
            tdmsg.Visible = false;
            lblMainMsg.Text = "";
            string message = "";

            objBAL = new ClsBAL();
         message =   objBAL.AddAgent(txtName.Text.Trim(), "", Convert.ToDateTime("1/1/1900"), txtCity.Text.Trim().ToString(),
         ddlState.SelectedItem.Text.ToString(),
         txtAddress.Text.Trim().ToString(),
         txtPinCode.Text.Trim().ToString(),
         txtMobileNo.Text.Trim().ToString(),
          "", "", txtEmailId.Text.Trim().ToString(), "", "", "1",
         txtUsername.Text.Trim().ToString(),
         txtPassword.Text.Trim().ToString(),
         0,
        0, Convert.ToInt32("0"), "CSE", ddlcountry.SelectedValue,"","","","","","");

            // lblMainMsg.Text = message;

         if (message == "Agent registration is completed successfully.")
         {
             Label1.Text = "CSE Registration is Completed Successfully";

             mail();
             BindUsers();
             Cleardata();

             MVUsers.ActiveViewIndex = 0;
             MVUsers.Visible = true;
             lblMainMsg.ForeColor = System.Drawing.Color.Green;

         }
         else
         {
             lblMainMsg.ForeColor = System.Drawing.Color.Red;
             tdmsg.Visible = true;
             lblMainMsg.Text = message;
         }

        }
        catch (Exception ex)
        {
            objBAL.Logerror(this.Page.ToString(), "btnSaveUD_Click", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:51,代码来源:Users.aspx.cs

示例5: btnSavePermissions_Click


//.........这里部分代码省略.........
                //CheckBox ChkDelete1 = (CheckBox)row.FindControl("ChkDelete");
                //CheckBox ChkEdit1 = (CheckBox)row.FindControl("ChkEdit");
                //CheckBox ChkPermissions1 = (CheckBox)row.FindControl("ChkPermissions");
                objBAL = new ClsBAL();
                objBAL.ID = Convert.ToInt32(lblUserID.Text);
                objBAL.screenID = Convert.ToInt32(lblScrnID.Text);
                //if (lblScrnName.Text == "Ticket")
                //{
                //    if (ChkAdd1.Checked == true)
                //    {
                //        objBAL.book = Convert.ToInt32(1);
                //    }
                //    else if (ChkAdd1.Checked == false)
                //    {
                //        objBAL.book = Convert.ToInt32(0);
                //    }
                //if (ChkEdit1.Checked)
                //{
                //    objBAL.cancel = Convert.ToInt32(1);
                //}
                //else if (ChkEdit1.Checked == false)
                //{
                //    objBAL.cancel = Convert.ToInt32(0);
                //}
                //}
                //else
                //{
                if (ChkAdd1.Checked == true)
                {
                    objBAL.book = Convert.ToInt32(1);
                }
                else if (ChkAdd1.Checked == false)
                {
                    objBAL.book = Convert.ToInt32(0);
                }
                //if (ChkEdit1.Checked)
                //{
                //    objBAL.edit = Convert.ToInt32(1);
                //}
                //else if (ChkEdit1.Checked == false)
                //{
                //    objBAL.edit = Convert.ToInt32(0);
                //}
                // }
                //if (ChkDelete1.Checked == true)
                //{
                //    objBAL.delete = Convert.ToInt32(1);
                //}
                //else if (ChkDelete1.Checked == false)
                //{
                //    objBAL.delete = Convert.ToInt32(0);
                //}

                //if (ChkPermissions1.Checked == true)
                //{
                //    objBAL.permissions = Convert.ToInt32(1);
                //}
                //else if (true)
                //{
                //    objBAL.permissions = Convert.ToInt32(0);
                //}
                //if (ChkView1.Checked == true)
                //{
                //    objBAL.view = Convert.ToInt32(1);
                //}
                //else if (ChkView1.Checked == false)
                //{
                //    objBAL.view = Convert.ToInt32(0);
                //}
                objBAL.createdBy = Convert.ToInt32(1);
                objBAL.modifiedBy = Convert.ToInt32(1);
                if (objBAL.AddPermissions())
                {
                    tdmsg.Visible = true;
                  //  tdmsg.Style.Add("background-color:#6CC417;", "");
                    lblMainMsg.Text = "Permissions details saved Successfully....";
                    lblMainMsg.ForeColor = System.Drawing.Color.Green;
                    MVUsers.ActiveViewIndex = 0;
                }
                else
                {
                    tdmsg.Visible = true;
                   // tdmsg.Style.Add("background-color:#E77471;", "");
                    lblMainMsg.Text = "OOPS...Failed to set Permissions setails....";
                    lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
                    break;
                }
            }
        }
        catch (Exception ex)
        {
            objBAL.Logerror(this.Page.ToString(), "btnSavePermissions_Click", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
            throw ex;
        }
        finally
        {
            MVUsers.ActiveViewIndex = 0;
            MVUsers.Visible = true;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:Users.aspx.cs

示例6: GvUsers_RowCommand

    protected void GvUsers_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Change")
        {
            tdmsg.Visible = false;

            lblMainMsg.Text = "";
            // int index = Convert.ToInt32(e.CommandArgument);

            // Retrieve the row that contains the button clicked
            // by the user from the Rows collection.
            // GridViewRow row = GvUsers.Rows[index];
            try
            {
                //if (ViewState["UserPermissions"] != null)
                //{
                //if (ViewState["EditUser"].ToString() == "1")
                //{
                GridViewRow gRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
                // GridViewRow gRow = (GridViewRow)(Label)e.CommandSource;
                Label lblUserName1 = (Label)gRow.FindControl("lblUserName");
                Label lblName1 = (Label)gRow.FindControl("lblName");
                LinkButton lblRoleID1 = (LinkButton)gRow.FindControl("lblRoleID");
                Label lblID1 = (Label)gRow.FindControl("lblID");
                Label lblPassword1 = (Label)gRow.FindControl("lblPassword");

                Label lblEmailId = (Label)gRow.FindControl("lblEmailId");
                Label lblAddress = (Label)gRow.FindControl("lblAddress");
                Label lblCity = (Label)gRow.FindControl("lblCity");
                Label lblState = (Label)gRow.FindControl("lblState");
                Label lblCountry = (Label)gRow.FindControl("lblCountry");
                Label lblPinCode = (Label)gRow.FindControl("lblPinCode");
                Label lblMobileNo = (Label)gRow.FindControl("lblMobileNo");

                txtUsername.Text = lblUserName1.Text;
                txtName.Text = lblName1.Text;
                ddlRole.SelectedValue = lblRoleID1.Text;
                lblID.Text = lblID1.Text;
                txtPassword.Text = lblPassword1.Text;
                txtCnfrmPswd.Text = lblPassword1.Text;
                txtCnfrmPswd.TextMode = TextBoxMode.SingleLine;
                txtPassword.TextMode = TextBoxMode.SingleLine;

                txtUsername.Enabled = false;

                txtEmailId.Text = lblEmailId.Text;
                txtAddress.Text = lblAddress.Text;
                txtCity.Text = lblCity.Text;
                ddlState.Text = lblState.Text;
                ddlcountry.Text = lblCountry.Text;
                txtPinCode.Text = lblPinCode.Text;
                txtMobileNo.Text = lblMobileNo.Text;

                btnSaveUD.Visible = false;
                btnCancel.Visible = true;
                btnUpdateUD.Visible = true;
                BindRoles();
                MVUsers.ActiveViewIndex = 1;
                MVUsers.Visible = true;
                //}
                //else
                //{
                //    tdmsg.Visible = true;
                //    tdmsg.Style.Add("background-color:#E77471;", "");
                //    lblMainMsg.Text = "   No Permission to Edit Users.Please Contact Administrator for further details...";
                //    lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
                //    MVUsers.ActiveViewIndex = 0;
                //    MVUsers.Visible = true;
                //}
                // }

            }
            catch (Exception ex)
            {
                objBAL.Logerror(this.Page.ToString(), "GvUsers_RowCommand_Change", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
                throw;
            }
            #region TEst
            //System.Text.StringBuilder sb = new System.Text.StringBuilder();
            //sb.Append(@"<script language='javascript'>");
            //sb.Append(@"$(document).ready(function () {");
            //sb.Append(@"$('[id$='txtUsername']').val =");
            //sb.Append(lblUserName1.Text);
            //sb.Append(@";$('[id$='txtName']').val = ");
            //sb.Append(lblName1.Text);
            //sb.Append(@";$('[id$='txtPassword']').val =");
            //sb.Append(lblPassword1.Text);
            //sb.Append(@";$('[id$='txtCnfrmPswd']').val =");
            //sb.Append(lblPassword1.Text);
            //sb.Append(@";$('[id$='ddlRole']').val =");
            //sb.Append(lblRoleID1.Text);
            //sb.Append(@"$('.adduser').show('slow');");
            //sb.Append(@"$('.abc').hide('slow');");
            //sb.Append(@"$('[id$='btnSaveUD']').hide('slow');");
            //sb.Append(@"$('[id$='btnUpdateUD']').show('slow');");
            //sb.Append(@"});});");
            //sb.Append(@"</script>");

            //ScriptManager.RegisterStartupScript(GvUsers, GvUsers.GetType(), "JSCR", sb.ToString(), false);
            #endregion
//.........这里部分代码省略.........
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:101,代码来源:Users.aspx.cs


注:本文中的BAL.ClsBAL.Logerror方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。