예제 #1
0
 public bool IsFlagExists(string FormID, string ID, byte Flag, string cnKey)
 {
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     return dal.Exists(ID,"Flag=" + Flag);
 }
예제 #2
0
 public bool IsExists(string FormID, string ID,string cnKey)
 {
     ID = Server.UrlDecode(ID);
     Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
     return dal.Exists(ID);
 }
예제 #3
0
    public string IsExistsByFilter(string FormID, string EnterpriseID, string ID, string cnKey)
    {
        ID = Server.UrlDecode(ID);
        EnterpriseID = Server.UrlDecode(EnterpriseID);
        string filter = string.Format("EnterpriseID='{0}'", EnterpriseID);

        Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
        Js.BLL.Enterprise.CheckDal cdal = new Js.BLL.Enterprise.CheckDal(FormID, cnKey);

        byte strTemp = 0;
        if (ID.Length > 0)
        {
            if (dal.Exists(ID, filter))
                strTemp = 1;
            else
                strTemp = 0;
        }
        if (FormID == "EP_Department" || FormID == "EP_Person")
        { }
        else
        {
            if (strTemp == 0)
            {
                if (cdal.IsEnterpriseChecked(EnterpriseID))
                    strTemp = 2;
            }
        }
        return strTemp.ToString();
    }
    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(" LogisticsID='{0}' and EnterpriseID='{1}'", ID, Session["EnterpriseID"].ToString());
            Js.BLL.BaseDal dal = new Js.BLL.BaseDal(FormID, cnKey);
            DataTable dt = dal.GetRecord(ViewState["StrWhere"].ToString());
            ViewState["dt"] = dt;
            Js.BLL.Sys.SysComDal sdal = new Js.BLL.Sys.SysComDal(cnKey);
            BindDropDownList();
            BindData(dt);
            //if (sdal.GetBillCanBeEdit(FormID, ID, "EnterpriseID='" + Session["EnterpriseID"].ToString() + "'") > 0)
            //    this.btnEdit.Enabled = false;

            if (FormID == "EP_ProductLogistics")
            {
                this.btnSourceView.Enabled = false;
                this.btnDelete.Visible = false;
                this.btnAdd.Visible = false;
            }
            else
            {
                string filter = string.Format("EnterpriseID='{0}'", Session["EnterpriseID"].ToString());
                Js.BLL.BaseDal bdal = new Js.BLL.BaseDal("EP_ProductLogistics", Session["cnKey"].ToString());
                if (bdal.Exists(this.txtLogisticsID.Text, filter))
                    this.btnSourceView.Enabled = true;
                else
                    this.btnSourceView.Enabled = false;

                this.ltlTitle.Text = Resources.Resource.EP_ProductLogisticsNoCheckTitle;
                this.btnModify.Visible = false;
            }
        }
    }