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


C# BLL.BaseDal类代码示例

本文整理汇总了C#中Js.BLL.BaseDal的典型用法代码示例。如果您正苦于以下问题:C# BaseDal类的具体用法?C# BaseDal怎么用?C# BaseDal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BaseDal类属于Js.BLL命名空间,在下文中一共展示了BaseDal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();

        dr["StateID"] = this.txtStateListID.Text;
        dr["StateName"] = this.txtStateName.Text;
        dr["Style"] = this.ddlStyle.SelectedIndex;
        dr["Description"] = this.txtMemo.Text;
        dr["ImageProvider"] = this.chkImageProvider.Checked;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtCreateDate.Text.Length > 0)
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["LastModifyDate"] = DateTime.Now;// this.txtLastModifyDate.Text;//異動日期
        dr["LastModifyUserName"] = Session["User"].ToString();// this.txtLastModifyUserName.Text;//異動人員
        if (this.txtCheckDate.Text.Length > 0)
        dr["CheckDate"] = this.txtCheckDate.Text;
        dr["CheckUserName"] = this.txtCheckUserName.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("StateListView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtStateListID.Text));
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:30,代码来源:StateListEdit.aspx.cs

示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["cnKey"] != null)
         cnKey = Session["cnKey"].ToString();
     ID = Request.QueryString["ID"] + "";
     FormID = Request.QueryString["FormID"] + "";
     if (!IsPostBack)
     {
         ViewState["StrWhere"] = string.Format(" PersonID='{0}' and EnterpriseID='{1}'", ID, Session["EnterpriseID"].ToString());
         BindDropDownList();
         Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
         if (ID != "")
         {
             DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
             BindData(dt);
             this.txtPersonID.ReadOnly = true;
         }
         else
         {
             this.txtPersonID.Text = dal.GetMaxID("EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");
             this.txtEnterpriseID.Text = Session["EnterpriseID"].ToString();
             this.txtEnterpriseName.Text = Session["EnterpriseName"].ToString();
             this.txtLastModifyUserName.Text = Session["User"].ToString();
             this.txtLastModifyDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
             this.txtCreateUserName.Text = Session["User"].ToString();
             this.txtCreateDate.Text = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
         }
     }
 }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:29,代码来源:PersonEdit.aspx.cs

示例3: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["ProductionUnitID"] = this.txtProductionUnitID.Text;
        dr["ProductionUnitName"] = this.txtProductionUnitName.Text;
        dr["Memo"] = this.txtMemo.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
        dr["CheckUserName"] = this.txtCheckUserName.Text;
        if (this.txtCheckDate.Text.Length > 0)
            dr["CheckDate"] = this.txtCheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        //Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
        Response.Redirect("ProductionUnitView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtProductionUnitID.Text));
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:27,代码来源:ProductionUnitEdit.aspx.cs

示例4: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        BillID = Request.QueryString["BillID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" BillID='{0}'", BillID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            if (BillID != "")
            {
                DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
                BindData(dt);
                this.txtBillID.ReadOnly = true;
            }
            else
            {
                this.txtBillID.Text = dal.GetMaxID();
                this.txtLastModifyUserName.Text = Session["User"].ToString();
                this.txtLastModifyDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
                this.txtCreateUserName.Text = Session["User"].ToString();
                this.txtCreateDate.Text = DateTime.Now.ToString(Js.Com.User.strDateFormat);
            }

        }
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:25,代码来源:InvalidLabelEdit.aspx.cs

示例5: btnDeletet_Click

    protected void btnDeletet_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey);
        // Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal();
        int iReturn = 0;
        for (int i = 0; i < this.GridView1.Rows.Count; i++)
        {
            CheckBox cb = (CheckBox)(this.GridView1.Rows[i].FindControl("cbSelect"));
            if (cb.Checked)
            {
                HyperLink hk = (HyperLink)(this.GridView1.Rows[i].FindControl("HyperLink1"));
                iReturn = sdal.GetBillCanBeEdit(FormID, hk.Text);// "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");

                if (iReturn == 1)
                    JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_Checked);
                else if (iReturn == 2)
                    JScript.Instance.ShowMessage(this.updatePanel, hk.Text + Resources.Resource.NotDelete_IsUsed);
                else
                {
                    dal.Delete(hk.Text);//, "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'");
                    dal.DeleteDetail(hk.Text);
                }
            }
        }
        SetBtnEnabled("");
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:27,代码来源:Orders.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["BillID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" BillID='{0}'", ID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            if (ID != "")
            {
                DataTable dt = dal.GetViewRecord(ViewState["StrWhere"].ToString());
                BindData(dt);
                this.txtBillID.ReadOnly = true;
                this.txtBillID.CssClass = "TextRead";
            }
            else
            {
                this.txtBillID.Text = dal.GetAutoCode(DateTime.Now);
                this.txtBillDate.DateValue = DateTime.Now;
                this.txtLastModifyUserName.Text = Session["User"].ToString();
                this.txtLastModifyDate.Text = ToYMDHM(DateTime.Now);
                this.txtCreateUserName.Text = Session["User"].ToString();
                this.txtCreateDate.Text = ToYMDHM(DateTime.Now);
            }

            BindEdll();

            BindOther();
        }
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:30,代码来源:ScheduleEdit.aspx.cs

示例7: BindEdll

    private void BindEdll()
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
        string filter = "1=1";
        if (this.rbFileType2.Checked)
            filter = "1=2";
        DataTable dt = dal.GetDistinctRecord("FileDesc", filter);

        if (this.rbFileType2.Checked)
        {
            DataRow dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductDesc;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductResumeDesc;
            dt.Rows.Add(dr);

            dr = dt.NewRow();
            dr["FileDesc"] = Resources.Resource.EP_ProductLogistics;
            dt.Rows.Add(dr);

        }
        this.txtFileDesc.DataSource = dt;
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:25,代码来源:Upload.aspx.cs

示例8: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["WarehouseID"] = this.txtWarehouseID.Text.Trim().ToUpper();
        dr["WarehouseName"] = this.txtWarehouseName.Text;
        dr["Contact"] = this.txtContact.Text.Trim();
        dr["ContactPhone"] = this.txtContactPhone.Text.Trim();
        dr["Address"] = this.txtAddress.Text.Trim();
        dr["Memo"] = this.txtMemo.Text.Trim();
        dr["CreateUserName"] = this.txtCreateUserName.Text;
        dr["CreateDate"] = this.txtCreateDate.Text;
        dr["LastModifyUserName"] = Session["User"].ToString();
        dr["LastModifyDate"] = DateTime.Now.ToString(Js.Com.User.strDateFormat);
        dr["CheckUserName"] = this.txtCheckUserName.Text;
        if (this.txtCheckDate.Text.Length > 0)
            dr["CheckDate"] = this.txtCheckDate.Text;
        dr["StopUserName"] = this.txtStopUserName.Text;
        if (this.txtStopDate.Text.Length > 0)
            dr["StopDate"] = this.txtStopDate.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
        {
            dal.Add(dr);
            //插入標籤數量
            Js.BLL.Label.StyleDal sdal = new Js.BLL.Label.StyleDal(cnKey);
            sdal.InsertWarehousePagesByWID(this.txtWarehouseID.Text.Trim().ToUpper(), Session["User"].ToString());
        }

        //Response.Redirect("Departments.aspx?FormID=" + Server.UrlEncode(FormID));
        Response.Redirect("WarehouseView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtWarehouseID.Text));
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:35,代码来源:WarehouseEdit.aspx.cs

示例9: btnPre_Click

 protected void btnPre_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     DataTable dt = dal.GetRecord("P", this.txtProductionUnitID.Text);
     if (dt != null)
         BindData(dt);
 }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:7,代码来源:ProductionUnitView.aspx.cs

示例10: BindGrid

 private void BindGrid()
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, Session["EnterpriseID"].ToString());
     DataTable dt = dal.GetViewRecord(ViewState["StrWhere"].ToString());
     this.GridView1.DataSource = dt;
     this.GridView1.DataBind();
 }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:7,代码来源:QueryChecked.aspx.cs

示例11: BindDetail

    private void BindDetail(string ID)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);

        string filter = string.Format("Flag=1 and {0}='{1}'", KeyField, ID);
        DataTable dt = dal.GetSubDetail(EnterpriseID, filter).Tables[0];
        this.GridView2.DataSource = dt.DefaultView;
        this.GridView2.DataBind();

        filter = string.Format("Flag=2 and {0}='{1}'", KeyField, ID);
        dt = dal.GetSubDetail(EnterpriseID, filter).Tables[0];
        this.GridView3.DataSource = dt.DefaultView;
        this.GridView3.DataBind();
        if (GridView2.Rows.Count != 0 && GridView3.Rows.Count != 0)
        {
            for (var i = 0; i < this.GridView2.Columns.Count; i++)
            {
                if (GridView2.Rows[0].Cells[i].Text != GridView3.Rows[0].Cells[i].Text)
                {
                    GridView2.Rows[0].Cells[i].ForeColor = System.Drawing.Color.Red;
                    GridView3.Rows[0].Cells[i].ForeColor = System.Drawing.Color.Red;
                }
            }
        }
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:25,代码来源:ProductResumeCompare.aspx.cs

示例12: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["MemberID"] = this.txtMemberID.Text;
        dr["Country"] = this.EddlCountry.Text;
        dr["Password"] = this.txtPassword.Text.Trim();
        dr["PasswordHint"] = this.txtPasswordHint.Text.Trim();
        dr["Name"] = this.txtName.Text.Trim();
        if (this.ddlSex.SelectedIndex > 0)
            dr["Sex"] = 1;
        else
            dr["Sex"] = 0;
        dr["EMail"] = this.txtEMail.Text;
        dr["SpareEMail"] = this.txtSpareEMail.Text;
        if(this.txtBirthday.Text.Trim().Length>0)
            dr["Birthday"] = this.txtBirthday.Text;
        dr["CellPhone"] = this.txtCellPhone.Text;
        dr["LinkPhone"] = this.txtLinkPhone.Text;
        dr["ZipCode1"] = this.txtZipCode1.Text;
        dr["Address1"] = this.txtAddress1.Text;
        dr["ZipCode2"] = this.txtZipCode2.Text;
        dr["Address2"] = this.txtAddress2.Text;
        dr["WebSite"] = this.txtWebSite.Text;

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("MemberView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtMemberID.Text));
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:33,代码来源:MemberEdit.aspx.cs

示例13: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        ID = Request.QueryString["ID"] + "";
        FormID = Request.QueryString["FormID"] + "";
        if (!IsPostBack)
        {
            ViewState["StrWhere"] = string.Format(" AnnounceID='{0}'", ID);
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
            DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
            ViewState["dt"] = dt;

            BindData(dt);
            Js.BLL.System.MessageDal mdal = new Js.BLL.System.MessageDal();
            int UserFlag;

            if (this.txtAnnouncerUserName.Text == Session["User"].ToString())
            {
                UserFlag = int.Parse(this.txtReceiverFlag0.Text);
                mdal.UpdateMessageRead1(ID, UserFlag, this.txtReceiverUserName.Text);
            }
            else
            {
                UserFlag = Session["UserType"].ToString() == "BU" ? 0 : 1;
                mdal.UpdateMessageRead(ID, UserFlag, Session["User"].ToString());
            }
        }
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:27,代码来源:ReadMessageView.aspx.cs

示例14: btnPre_Click

 protected void btnPre_Click(object sender, EventArgs e)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID);
     DataTable dt = dal.GetRecord("P", this.ddlRoleID.SelectedValue);
     if (dt != null)
         BindData(dt);
 }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:7,代码来源:BU_RoleToUserView.aspx.cs

示例15: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
        DataRow dr = dt.NewRow();
        dr["Flag"] = Flag;//旗標
        dr["BillID"] = this.txtBillID.Text;//上架單號
        if (this.txtEnableDate.Text.Length > 0) dr["EnableDate"] = this.txtEnableDate.DateValue;//日期
        dr["EnterpriseID"] = this.txtEnterpriseID.Text;//企業用戶編號
        dr["EnterpriseName"] = this.txtEnterpriseName.Text;//企業用戶名稱
        dr["BillState"] = this.ddlBillState.SelectedIndex;//狀態 0未上架、1異常待修正、2檢查OK、3上架中、4已上架
        dr["QtyTotal"] = int.Parse(this.txtQtyTotal.Text);//數量合計
        if (this.txtCreateDate.Text.Length > 0) dr["CreateDate"] = this.txtCreateDate.Text;//建檔日期
        dr["CreateUserName"] = this.txtCreateUserName.Text;//建檔人員
        if (this.txtLastModifyDate.Text.Length > 0) dr["LastModifyDate"] = this.txtLastModifyDate.Text;//異動日期
        dr["LastModifyUserName"] = this.txtLastModifyUserName.Text;//異動人員
        if (this.txtEP_CheckDate.Text.Length > 0) dr["EP_CheckDate"] = this.txtEP_CheckDate.Text;//建檔日期
        dr["EP_CheckUserName"] = this.txtEP_CheckUserName.Text;//營運覆核
        if (this.txtBU_CheckDate.Text.Length > 0) dr["BU_CheckDate"] = this.txtBU_CheckDate.Text;//營運覆核日期
        dr["BU_CheckUserName"] = this.txtBU_CheckUserName.Text;//營運覆核用戶

        if (ID.Length > 0)
            dal.Update(dr, ID);
        else
            dal.Add(dr);

        Response.Redirect("EnableLabelNoView.aspx?FormID=" + Server.UrlEncode(FormID) + "&ID=" + Server.UrlEncode(this.txtBillID.Text));
    }
开发者ID:qq5013,项目名称:SenseDigital,代码行数:28,代码来源:EnableLabelNoEdit.aspx.cs


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