function Delete()
 {
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->CmdExecution = true;
     $Where = "";
     $wp = new clsSQLParameters($this->ErrorBlock);
     $wp->AddParameter("1", "ctrlp_user_attribute_id", ccsFloat, "", "", $this->p_user_attribute_id->GetValue(true), "", false);
     if (!$wp->AllParamsSet()) {
         $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildDelete", $this->Parent);
     $wp->Criterion[1] = $wp->Operation(opEqual, "p_user_attribute_id", $wp->GetDBValue("1"), $this->ToSQL($wp->GetDBValue("1"), ccsFloat), false);
     $Where = $wp->Criterion[1];
     $this->SQL = "DELETE FROM p_user_attribute";
     $this->SQL = CCBuildSQL($this->SQL, $Where, "");
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteDelete", $this->Parent);
     if ($this->Errors->Count() == 0 && $this->CmdExecution) {
         $this->query($this->SQL);
         $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteDelete", $this->Parent);
     }
 }
Exemple #2
0
 function Update()
 {
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->CmdExecution = true;
     $Where = "";
     $this->cp["p_role_id"] = new clsSQLParameter("ctrlp_role_id", ccsFloat, "", "", $this->p_role_id->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["code"] = new clsSQLParameter("ctrlcode", ccsText, "", "", $this->code->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["listing_no"] = new clsSQLParameter("ctrllisting_no", ccsFloat, "", "", $this->listing_no->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["valid_from"] = new clsSQLParameter("ctrlvalid_from", ccsDate, $DefaultDateFormat, $this->DateFormat, $this->valid_from->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["valid_to"] = new clsSQLParameter("ctrlvalid_to", ccsDate, $DefaultDateFormat, $this->DateFormat, $this->valid_to->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["description"] = new clsSQLParameter("ctrldescription", ccsText, "", "", $this->description->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["creation_date"] = new clsSQLParameter("ctrlcreation_date", ccsDate, $DefaultDateFormat, $this->DateFormat, $this->creation_date->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["created_by"] = new clsSQLParameter("ctrlcreated_by", ccsText, "", "", $this->created_by->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["updated_date"] = new clsSQLParameter("ctrlupdated_date", ccsDate, $DefaultDateFormat, $this->DateFormat, $this->updated_date->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["updated_by"] = new clsSQLParameter("ctrlupdated_by", ccsText, "", "", $this->updated_by->GetValue(true), NULL, false, $this->ErrorBlock);
     $wp = new clsSQLParameters($this->ErrorBlock);
     $wp->AddParameter("1", "urlp_role_id", ccsFloat, "", "", CCGetFromGet("p_role_id", NULL), "", false);
     if (!$wp->AllParamsSet()) {
         $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
     if (!is_null($this->cp["p_role_id"]->GetValue()) and !strlen($this->cp["p_role_id"]->GetText()) and !is_bool($this->cp["p_role_id"]->GetValue())) {
         $this->cp["p_role_id"]->SetValue($this->p_role_id->GetValue(true));
     }
     if (!is_null($this->cp["code"]->GetValue()) and !strlen($this->cp["code"]->GetText()) and !is_bool($this->cp["code"]->GetValue())) {
         $this->cp["code"]->SetValue($this->code->GetValue(true));
     }
     if (!is_null($this->cp["listing_no"]->GetValue()) and !strlen($this->cp["listing_no"]->GetText()) and !is_bool($this->cp["listing_no"]->GetValue())) {
         $this->cp["listing_no"]->SetValue($this->listing_no->GetValue(true));
     }
     if (!is_null($this->cp["valid_from"]->GetValue()) and !strlen($this->cp["valid_from"]->GetText()) and !is_bool($this->cp["valid_from"]->GetValue())) {
         $this->cp["valid_from"]->SetValue($this->valid_from->GetValue(true));
     }
     if (!is_null($this->cp["valid_to"]->GetValue()) and !strlen($this->cp["valid_to"]->GetText()) and !is_bool($this->cp["valid_to"]->GetValue())) {
         $this->cp["valid_to"]->SetValue($this->valid_to->GetValue(true));
     }
     if (!is_null($this->cp["description"]->GetValue()) and !strlen($this->cp["description"]->GetText()) and !is_bool($this->cp["description"]->GetValue())) {
         $this->cp["description"]->SetValue($this->description->GetValue(true));
     }
     if (!is_null($this->cp["creation_date"]->GetValue()) and !strlen($this->cp["creation_date"]->GetText()) and !is_bool($this->cp["creation_date"]->GetValue())) {
         $this->cp["creation_date"]->SetValue($this->creation_date->GetValue(true));
     }
     if (!is_null($this->cp["created_by"]->GetValue()) and !strlen($this->cp["created_by"]->GetText()) and !is_bool($this->cp["created_by"]->GetValue())) {
         $this->cp["created_by"]->SetValue($this->created_by->GetValue(true));
     }
     if (!is_null($this->cp["updated_date"]->GetValue()) and !strlen($this->cp["updated_date"]->GetText()) and !is_bool($this->cp["updated_date"]->GetValue())) {
         $this->cp["updated_date"]->SetValue($this->updated_date->GetValue(true));
     }
     if (!is_null($this->cp["updated_by"]->GetValue()) and !strlen($this->cp["updated_by"]->GetText()) and !is_bool($this->cp["updated_by"]->GetValue())) {
         $this->cp["updated_by"]->SetValue($this->updated_by->GetValue(true));
     }
     $wp->Criterion[1] = $wp->Operation(opEqual, "p_role_id", $wp->GetDBValue("1"), $this->ToSQL($wp->GetDBValue("1"), ccsFloat), false);
     $Where = $wp->Criterion[1];
     $this->UpdateFields["p_role_id"]["Value"] = $this->cp["p_role_id"]->GetDBValue(true);
     $this->UpdateFields["code"]["Value"] = $this->cp["code"]->GetDBValue(true);
     $this->UpdateFields["listing_no"]["Value"] = $this->cp["listing_no"]->GetDBValue(true);
     $this->UpdateFields["valid_from"]["Value"] = $this->cp["valid_from"]->GetDBValue(true);
     $this->UpdateFields["valid_to"]["Value"] = $this->cp["valid_to"]->GetDBValue(true);
     $this->UpdateFields["description"]["Value"] = $this->cp["description"]->GetDBValue(true);
     $this->UpdateFields["creation_date"]["Value"] = $this->cp["creation_date"]->GetDBValue(true);
     $this->UpdateFields["created_by"]["Value"] = $this->cp["created_by"]->GetDBValue(true);
     $this->UpdateFields["updated_date"]["Value"] = $this->cp["updated_date"]->GetDBValue(true);
     $this->UpdateFields["updated_by"]["Value"] = $this->cp["updated_by"]->GetDBValue(true);
     $this->SQL = CCBuildUpdate("p_role", $this->UpdateFields, $this);
     $this->SQL .= strlen($Where) ? " WHERE " . $Where : $Where;
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent);
     if ($this->Errors->Count() == 0 && $this->CmdExecution) {
         $this->query($this->SQL);
         $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent);
     }
 }
 function Update()
 {
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->CmdExecution = true;
     $this->cp["password"] = new clsSQLParameter("ctrlpassword_Shadow", ccsText, "", "", $this->password_Shadow->GetValue(true), NULL, false, $this->ErrorBlock);
     $wp = new clsSQLParameters($this->ErrorBlock);
     $wp->AddParameter("1", "expr13", ccsInteger, "", "", CCGetUserID(), "", false);
     if (!$wp->AllParamsSet()) {
         $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
     if (!is_null($this->cp["password"]->GetValue()) and !strlen($this->cp["password"]->GetText()) and !is_bool($this->cp["password"]->GetValue())) {
         $this->cp["password"]->SetValue($this->password_Shadow->GetValue(true));
     }
     $wp->Criterion[1] = $wp->Operation(opEqual, "id", $wp->GetDBValue("1"), $this->ToSQL($wp->GetDBValue("1"), ccsInteger), false);
     $Where = $wp->Criterion[1];
     $this->UpdateFields["password"]["Value"] = $this->cp["password"]->GetDBValue(true);
     $this->SQL = CCBuildUpdate("alm_users", $this->UpdateFields, $this);
     $this->SQL .= strlen($Where) ? " WHERE " . $Where : $Where;
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent);
     if ($this->Errors->Count() == 0 && $this->CmdExecution) {
         $this->query($this->SQL);
         $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent);
     }
 }
Exemple #4
0
 function Update()
 {
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->CmdExecution = true;
     $this->cp["created_by"] = new clsSQLParameter("ctrlcreated_by", ccsText, "", "", $this->created_by->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["updated_by"] = new clsSQLParameter("ctrlupdated_by", ccsText, "", "", $this->updated_by->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["creation_date"] = new clsSQLParameter("ctrlcreation_date", ccsText, "", "", $this->creation_date->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["updated_date"] = new clsSQLParameter("ctrlupdated_date", ccsText, "", "", $this->updated_date->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["latitude"] = new clsSQLParameter("ctrllatitude", ccsFloat, "", "", $this->latitude->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["longitude"] = new clsSQLParameter("ctrllongitude", ccsFloat, "", "", $this->longitude->GetValue(true), NULL, false, $this->ErrorBlock);
     $this->cp["file_name"] = new clsSQLParameter("ctrlfile_name", ccsText, "", "", $this->file_name->GetValue(true), NULL, false, $this->ErrorBlock);
     $wp = new clsSQLParameters($this->ErrorBlock);
     $wp->AddParameter("1", "ctrlpic_id", ccsFloat, "", "", $this->pic_id->GetValue(true), "", false);
     if (!$wp->AllParamsSet()) {
         $this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
     }
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
     if (!is_null($this->cp["created_by"]->GetValue()) and !strlen($this->cp["created_by"]->GetText()) and !is_bool($this->cp["created_by"]->GetValue())) {
         $this->cp["created_by"]->SetValue($this->created_by->GetValue(true));
     }
     if (!is_null($this->cp["updated_by"]->GetValue()) and !strlen($this->cp["updated_by"]->GetText()) and !is_bool($this->cp["updated_by"]->GetValue())) {
         $this->cp["updated_by"]->SetValue($this->updated_by->GetValue(true));
     }
     if (!is_null($this->cp["creation_date"]->GetValue()) and !strlen($this->cp["creation_date"]->GetText()) and !is_bool($this->cp["creation_date"]->GetValue())) {
         $this->cp["creation_date"]->SetValue($this->creation_date->GetValue(true));
     }
     if (!is_null($this->cp["updated_date"]->GetValue()) and !strlen($this->cp["updated_date"]->GetText()) and !is_bool($this->cp["updated_date"]->GetValue())) {
         $this->cp["updated_date"]->SetValue($this->updated_date->GetValue(true));
     }
     if (!is_null($this->cp["latitude"]->GetValue()) and !strlen($this->cp["latitude"]->GetText()) and !is_bool($this->cp["latitude"]->GetValue())) {
         $this->cp["latitude"]->SetValue($this->latitude->GetValue(true));
     }
     if (!is_null($this->cp["longitude"]->GetValue()) and !strlen($this->cp["longitude"]->GetText()) and !is_bool($this->cp["longitude"]->GetValue())) {
         $this->cp["longitude"]->SetValue($this->longitude->GetValue(true));
     }
     if (!is_null($this->cp["file_name"]->GetValue()) and !strlen($this->cp["file_name"]->GetText()) and !is_bool($this->cp["file_name"]->GetValue())) {
         $this->cp["file_name"]->SetValue($this->file_name->GetValue(true));
     }
     $wp->Criterion[1] = $wp->Operation(opEqual, "pic_id", $wp->GetDBValue("1"), $this->ToSQL($wp->GetDBValue("1"), ccsFloat), false);
     $Where = $wp->Criterion[1];
     $this->UpdateFields["created_by"]["Value"] = $this->cp["created_by"]->GetDBValue(true);
     $this->UpdateFields["updated_by"]["Value"] = $this->cp["updated_by"]->GetDBValue(true);
     $this->UpdateFields["creation_date"]["Value"] = $this->cp["creation_date"]->GetDBValue(true);
     $this->UpdateFields["updated_date"]["Value"] = $this->cp["updated_date"]->GetDBValue(true);
     $this->UpdateFields["latitude"]["Value"] = $this->cp["latitude"]->GetDBValue(true);
     $this->UpdateFields["longitude"]["Value"] = $this->cp["longitude"]->GetDBValue(true);
     $this->UpdateFields["file_name"]["Value"] = $this->cp["file_name"]->GetDBValue(true);
     $this->SQL = CCBuildUpdate("tb_pic_gis", $this->UpdateFields, $this);
     $this->SQL .= strlen($Where) ? " WHERE " . $Where : $Where;
     $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent);
     if ($this->Errors->Count() == 0 && $this->CmdExecution) {
         $this->query($this->SQL);
         $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent);
     }
 }