本文整理匯總了C#中Addr_OrganizeCityBLL類的典型用法代碼示例。如果您正苦於以下問題:C# Addr_OrganizeCityBLL類的具體用法?C# Addr_OrganizeCityBLL怎麽用?C# Addr_OrganizeCityBLL使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Addr_OrganizeCityBLL類屬於命名空間,在下文中一共展示了Addr_OrganizeCityBLL類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["Type"] = Request.QueryString["Type"] == null ? 0 : int.Parse(Request.QueryString["Type"]); //客戶類型,1:公司倉庫 2:經銷商 3:終端門店
#region 設置頁麵Title
if ((int)ViewState["Type"] == 1)
lb_PageTitle.Text = "辦事處出貨查詢";
else if ((int)ViewState["Type"] == 2)
lb_PageTitle.Text = "經銷商出貨查詢";
else if ((int)ViewState["Type"] == 3)
lb_PageTitle.Text = "零售商銷量查詢";
else if ((int)ViewState["Type"] == 4)
lb_PageTitle.Text = "辦事處進貨查詢";
#endregion
AdvancedSearch1.ExtCondition = "SVM_SalesVolume.Type=" + ViewState["Type"].ToString();
#region 判斷當前可查詢的範圍
Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);
if (staff.Model.OrganizeCity > 1)
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity, true);
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += staff.Model.OrganizeCity.ToString();
AdvancedSearch1.ExtCondition += " AND SVM_SalesVolume.OrganizeCity IN (" + orgcitys + ")";
}
#endregion
}
}
示例2: BindGrid
private void BindGrid()
{
string condition = " 1=1 ";
#region 組織查詢條件
if (string.IsNullOrEmpty(tr_OrganizeCity.SelectValue) && tr_OrganizeCity.SelectValue != "0")
{
//管理片區及所有下屬管理片區
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
condition += " AND ORD_OrderDelivery.OrganizeCity IN (" + orgcitys + ")";
}
//會計月條件
condition += " AND ORD_OrderDelivery.AccountMonth = " + ddl_Month.SelectedValue;
//申請單號
if (tbx_SheetCode.Text != "")
{
condition += " AND ORD_OrderDelivery.SheetCode like '%" + tbx_SheetCode.Text + "%'";
}
//審批狀態
if (ddl_State.SelectedValue != "0")
{
condition += " AND ORD_OrderDelivery.State = " + ddl_State.SelectedValue;
}
#endregion
// gv_List.ConditionString = condition;
gv_List.BindGrid();
}
示例3: bt_Add_Click
protected void bt_Add_Click(object sender, EventArgs e)
{
if ((int)ViewState["PriceID"] > 0)
{
if (tr_OrganizeCity.SelectValue != "0" && tr_OrganizeCity.SelectValue != tr_OrganizeCity.RootValue)
{
PDT_StandardPriceBLL bll = new PDT_StandardPriceBLL((int)ViewState["PriceID"]);
Addr_OrganizeCityBLL selectedcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string[] allparent = selectedcity.GetAllSuperNodeIDs().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (PDT_StandardPrice_ApplyCity city in bll.ApplyCityItems)
{
if (selectedcity.Model.ID == city.OrganizeCity)
{
MessageBox.Show(this, "對不起,該區域已在適用區域內,請勿重複添加!");
return;
}
if (allparent.Contains(city.OrganizeCity.ToString()))
{
MessageBox.Show(this, "對不起,要新增的區域的上級【" + TreeTableBLL.GetFullPathName("MCS_SYS.dbo.Addr_OrganizeCity", city.OrganizeCity) + "】已在適用區域內!");
return;
}
}
PDT_StandardPrice_ApplyCity c = new PDT_StandardPrice_ApplyCity();
c.OrganizeCity = int.Parse(tr_OrganizeCity.SelectValue);
bll.AddApplyCity(c);
BindCheckBoxList();
}
}
}
示例4: BindData
public void BindData()
{
string condition = "";
DateTime dtBegin = DateTime.Parse(this.tbx_begin.Text);
DateTime dtEnd = DateTime.Parse(this.tbx_end.Text).AddDays(1);
condition = "HR_ZhaoPinApply.InsertTime BETWEEN '" + dtBegin.ToString("yyyy-MM-dd") + "' AND '" + dtEnd.ToString("yyyy-MM-dd") + "' ";
if (tr_OrganizeCity.SelectValue != "1")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
condition += " AND HR_ZhaoPinApply.OrganizeCity IN (" + orgcitys + ")";
}
if (tr_Position.SelectValue != "0")
{
condition += " AND HR_ZhaoPinApply.sqgw =" + tr_Position.SelectValue;
}
//Response.Write(condition);
gv_List.ConditionString = condition;
gv_List.BindGrid();
}
示例5: BindGrid
public void BindGrid()
{
string condition = " 1 = 1 ";
#region 判斷當前可查詢的範圍
if (tr_OrganizeCity.SelectValue != "1")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
if (orgcitys != "") condition += " AND OrganizeCity IN (" + orgcitys + ")";
}
if (tr_Position.SelectValue != "1")
{
Org_PositionBLL org_position = new Org_PositionBLL(int.Parse(tr_Position.SelectValue));
string positions = org_position.GetAllChildPosition();
if (positions != "") positions += ",";
positions += tr_Position.SelectValue;
if (positions != "") condition += " AND Position IN (" + positions + ")";
}
#endregion
gv_List.BindGrid(Org_StaffNumberLimitBLL.GetModelList(condition));
}
示例6: BindGrid
private void BindGrid()
{
string condition = "1=1";
#region 組織查詢條件
//管理片區及所有下屬管理片區
if (tr_OrganizeCity.SelectValue != "1")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
condition += " AND FNA_StaffSalary.OrganizeCity IN (" + orgcitys + ")";
}
//會計月條件
condition += " AND FNA_StaffSalary.AccountMonth Between " + ddl_BeginMonth.SelectedValue;
condition += " AND " + ddl_EndMonth.SelectedValue;
//審批狀態
if (ddl_State.SelectedValue != "0")
{
condition += " AND FNA_StaffSalary.State = " + ddl_State.SelectedValue;
}
#endregion
gv_List.ConditionString = condition;
gv_List.BindGrid();
}
示例7: bt_Refresh_Click
protected void bt_Refresh_Click(object sender, EventArgs e)
{
string orgcitys = "";
if (tr_OrganizeCity.SelectValue != "0")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue), true);
orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
}
else
{
MessageBox.Show(this, "請選擇要查詢的管理片區!");
return;
}
ReportParameter[] _parms = {
new ReportParameter("OrganizeCitys", orgcitys),
new ReportParameter("BeginMonth", ddl_BeginMonth.SelectedValue),
new ReportParameter("EndMonth", ddl_EndMonth.SelectedValue)
};
ReportViewer1.ServerReport.ReportServerCredentials = new MCSReportServerCredentials();
ReportViewer1.ServerReport.ReportPath = ViewState["ReportPath"].ToString();
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ViewState["ReportServerUrl"].ToString());
ReportViewer1.ServerReport.SetParameters(_parms);
// ReportViewer1.ServerReport.Refresh();
}
示例8: BindGrid
private void BindGrid()
{
string condition = "1=1";
#region 組織查詢條件
if (chb_ToOrganizecityChild.Checked)
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue));
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
condition += " AND PDT_StandardPrice.OrganizeCity IN (" + orgcitys + ")";
}
else
{
condition += " AND PDT_StandardPrice.OrganizeCity=" + tr_OrganizeCity.SelectValue;
}
#endregion
//if (MCSTabControl1.SelectedIndex == 0)
//{
// condition += " AND PDT_StandardPrice.ActiveFlag=1 AND PDT_StandardPrice.ApproveFlag=1";
//}
//else
//{
// condition += " AND (PDT_StandardPrice.ActiveFlag=2 OR PDT_StandardPrice.ApproveFlag=2)";
//}
condition += " AND PDT_StandardPrice.ActiveFlag=1 AND PDT_StandardPrice.ApproveFlag=1";
gv_List.ConditionString = condition;
gv_List.BindGrid();
}
示例9: btn_Save_Click
protected void btn_Save_Click(object sender, EventArgs e)
{
if ((int)ViewState["ID"] == 1) return;
Addr_OrganizeCityBLL _bll;
if ((int)ViewState["ID"] == 0)
{
_bll = new Addr_OrganizeCityBLL();
}
else
{
_bll = new Addr_OrganizeCityBLL((int)ViewState["ID"]);
}
_bll.Model.Name = tbx_Name.Text;
_bll.Model.SuperID = int.Parse(tree_SuperID.SelectValue);
_bll.Model.Code = tbx_Code.Text;
_bll.Model.Level = new Addr_OrganizeCityBLL(_bll.Model.SuperID).Model.Level + 1;
if (select_Manager.SelectValue != "")
_bll.Model.Manager = int.Parse(select_Manager.SelectValue);
if (DictionaryBLL.GetDicCollections("Addr_OrganizeCityLevel")[_bll.Model.Level.ToString()] == null)
{
lbl_AlertInfo.Text = "添加城市失敗,等級超出範圍";
return;
}
_bll.Model["ManageRegion"] = tbx_ManageRegion.Text;
if ((int)ViewState["ID"] == 0)
{
if (_bll.Add() < 0)
{
lbl_AlertInfo.Text = "添加城市失敗。";
return;
}
}
else
{
if (_bll.Model.SuperID == _bll.Model.ID) return;
int ret = _bll.Update();
switch (ret)
{
case -1:
lbl_AlertInfo.Text = "更新城市失敗,城市名稱已存在";
return;
case -2:
lbl_AlertInfo.Text = "更新城市失敗,不能將當前城市設置為上級城市";
return;
case -3:
lbl_AlertInfo.Text = "更新城市失敗,不能將當前城市的子城市設置為上級城市";
return;
}
}
DataCache.RemoveCache("Cache-TreeTableBLL-GetAllNode-MCS_SYS.dbo.Addr_OrganizeCity");
Response.Redirect("OrganizeCityManage.aspx?SuperID=" + _bll.Model.SuperID.ToString());
}
示例10: btn_Delete_Click
protected void btn_Delete_Click(object sender, EventArgs e)
{
Addr_OrganizeCityBLL _bll = new Addr_OrganizeCityBLL(int.Parse(lbl_ID.Text));
if (_bll.Delete() < 0)
{
lbl_AlertInfo.Text = "該片區包含下級片區,請勿刪除";
return;
}
lbl_AlertInfo.Text = "";
Response.Redirect("OrganizeCityManage.aspx?SuperID=" + _bll.Model.SuperID.ToString());
}
示例11: bt_Generate_Click
protected void bt_Generate_Click(object sender, EventArgs e)
{
int month = int.Parse(ddl_Month.SelectedValue);
int organizecity = 0;
int client = 0;
int.TryParse(tr_OrganizeCity.SelectValue, out organizecity);
int.TryParse(select_Client.SelectValue, out client);
if (organizecity == 0)
{
MessageBox.Show(this, "請正確選擇管理片區");
return;
}
if (client == 0)
{
MessageBox.Show(this, "請正確選擇經銷商");
return;
}
#region 判斷指定區域下是否還有門店銷量未審核
string citys = new Addr_OrganizeCityBLL(organizecity).GetAllChildNodeIDs();
if (citys == "")
citys = organizecity.ToString();
else
citys += "," + organizecity.ToString();
string condition = "Type=3 AND Supplier=" + client.ToString() + " AND AccountMonth=" + month.ToString() +
" AND OrganizeCity IN (" + citys + ") AND ApproveFlag=2 AND Flag=1 AND EXISTS (SELECT 1 FROM MCS_CM.dbo.CM_Client WHERE ClientType=3 AND CM_Client.ID=SVM_SalesVolume.Client)";
int counts = SVM_SalesVolumeBLL.GetModelList(condition).Count;
if (counts > 0)
{
MessageBox.Show(this, "對不起,您區域還有" + counts.ToString() + "條門店銷量未審核");
return;
}
#endregion
int FeeType = 0;
FeeType = ConfigHelper.GetConfigInt("ContractFeeType-FL");
int id = CM_ContractBLL.CreateFLFeeApply(organizecity, month, client, (int)Session["UserID"], FeeType);
if (id > 0)
MessageBox.ShowAndRedirect(this, "返利費用申請單生成成功!", "FeeApplyDetail3.aspx?ID=" + id.ToString());
else if (id == 0)
MessageBox.Show(this, "對不起,目前尚無返利合同需要申請費用!");
else if (id == -1)
MessageBox.Show(this, "對不起,無返利費用生成!請檢查是否有返利店有銷量,或是之前已經生成該月的返利費用!");
else
MessageBox.Show(this, "對不起,返利合同費用申請單生成失敗!錯誤碼:" + id.ToString());
}
示例12: tr_OrganizeCity_Selected
protected void tr_OrganizeCity_Selected(object sender, MCSControls.MCSWebControls.SelectedEventArgs e)
{
int c = 0;
if (int.TryParse(tr_OrganizeCity.SelectValue, out c))
{
Addr_OrganizeCity city = new Addr_OrganizeCityBLL(c).Model;
if (city.Level == 5)
ddl_CityLevel.SelectedValue = "5";
else if (city.Level > 2)
ddl_CityLevel.SelectedValue = "4";
else
ddl_CityLevel.SelectedValue = "2";
}
}
示例13: BtnSave_Click
protected void BtnSave_Click(object sender, EventArgs e)
{
Addr_OrganizeCity mcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue)).Model;
if (MCSTabControl1.SelectedTabItem.Value == "1" && mcity != null && mcity.Level != ConfigHelper.GetConfigInt("OrganizePartCity-CityLevel"))
{
MessageBox.Show(this, "請選擇營業部再調整!");
return;
}
if (MCSTabControl1.SelectedTabItem.Value == "2" && mcity != null && mcity.Level != ConfigHelper.GetConfigInt("OrganizeCity-CityLevel"))
{
MessageBox.Show(this, "請選擇辦事處再調整!");
return;
}
FNA_StaffSalaryDataObjectBetaBLL bll = new FNA_StaffSalaryDataObjectBetaBLL();
if (!CheckSalesTargetAdujst())
{
return;
}
foreach (GridViewRow row in gv_List.Rows)
{
int id = (int)gv_List.DataKeys[row.RowIndex]["FNA_StaffSalaryDataObjectBeta_ID"];
TextBox txt_SalesTargetAdjust = gv_List.Rows[row.RowIndex].FindControl("tbx_SalesTargetAdujst") == null ? null : (TextBox)gv_List.Rows[row.RowIndex].FindControl("tbx_SalesTargetAdujst");
TextBox txt_SalesTargetAdjustRate = gv_List.Rows[row.RowIndex].FindControl("tbx_SalesTargetAdujstRate") == null ? null : (TextBox)gv_List.Rows[row.RowIndex].FindControl("tbx_SalesTargetAdujstRate");
decimal SalesTargetAdujst = 0, SalesTargetAdujstRate = 0;
TextBox tbx_Remark = gv_List.Rows[row.RowIndex].FindControl("tbx_Remark") == null ? null : (TextBox)gv_List.Rows[row.RowIndex].FindControl("tbx_Remark");
DropDownList ddl_Flag = row.FindControl("ddl_Flag") == null ? null : (DropDownList)row.FindControl("ddl_Flag");
if (txt_SalesTargetAdjust != null && txt_SalesTargetAdjustRate != null && decimal.TryParse(txt_SalesTargetAdjust.Text.Trim(), out SalesTargetAdujst)
&& decimal.TryParse(txt_SalesTargetAdjustRate.Text.Trim(), out SalesTargetAdujstRate))
{
bll = new FNA_StaffSalaryDataObjectBetaBLL(id);
decimal oldAdujstRate = bll.Model.Data08;
bll.Model.SalesTargetAdjust = SalesTargetAdujst;
bll.Model.Data08 = SalesTargetAdujstRate;
bll.Model.UpdateStaff = (int)Session["UserID"];
bll.Model.UpdateTime = DateTime.Now;
bll.Model["Remark"] = tbx_Remark.Text.Trim();
bll.Model.Flag = int.Parse(ddl_Flag.SelectedValue);
bll.Update();
if (bll.Model.ApproveFlag == 2 && oldAdujstRate != SalesTargetAdujstRate)
{
FNA_StaffSalaryDataObjectBetaBLL.Adjust(bll.Model.AccountMonth, SalesTargetAdujst, bll.Model.Staff);
}
}
}
BindGrid();
}
示例14: bt_Refresh_Click
protected void bt_Refresh_Click(object sender, EventArgs e)
{
string orgcitys = "";
if (tr_OrganizeCity.SelectValue != "0")
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(int.Parse(tr_OrganizeCity.SelectValue), true);
orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += tr_OrganizeCity.SelectValue;
}
else
{
MessageBox.Show(this, "請選擇要查詢的管理片區!");
return;
}
ReportViewer1.ServerReport.ReportServerCredentials = new MCSReportServerCredentials();
ReportViewer1.ServerReport.ReportPath = ViewState["ReportPath"].ToString();
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ViewState["ReportServerUrl"].ToString());
if (ReportViewer1.ServerReport.GetParameters().Count == 3)
{
int staff = 0;
int position = new Org_StaffBLL((int)Session["UserID"]).Model.Position;
string remark = new Org_PositionBLL(position).Model.Remark;
if (remark != null && remark.Contains("OnlyViewSelfReport"))
{
staff = (int)Session["UserID"];
}
ReportParameter[] _parms = {
new ReportParameter("OrganizeCitys", orgcitys),
new ReportParameter("Month", ddl_Month.SelectedValue),
new ReportParameter("Staff",staff.ToString())
};
ReportViewer1.ServerReport.SetParameters(_parms);
}
else
{
ReportParameter[] _parms = {
new ReportParameter("OrganizeCitys", orgcitys),
new ReportParameter("Month", ddl_Month.SelectedValue)
};
ReportViewer1.ServerReport.SetParameters(_parms);
}
}
示例15: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
#region 判斷當前可查詢的範圍
Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);
if (staff.Model.OrganizeCity >1)
{
Addr_OrganizeCityBLL orgcity = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity, true);
string orgcitys = orgcity.GetAllChildNodeIDs();
if (orgcitys != "") orgcitys += ",";
orgcitys += staff.Model.OrganizeCity.ToString();
as_uc_Journal.ExtCondition = " MCS_OA.dbo.JN_Journal.OrganizeCity IN (" + orgcitys + ") order by MCS_OA.dbo.JN_Journal.InsertTime desc";
}
#endregion
as_uc_Journal.DataKeyNames = new string[] { "JN_Journal_ID" };
}
}